Live data from Hacker News

We replaced Redis with MySQL for inventory reservations and it scaled

shopify.engineering

101–110 of 281 posts

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#101
post #27

Earlier quoted context omitted.

It's honestly weird Claude converges on this language because it's incredibly wordy and hard to parse. One would think semantic density would win out in training.

Who knows. I wish ant harshly penalized speaking litotically because it’s essentially reward hacking as it can often be read multiple ways. It’s also annoying as a human because Claude et al rate their own writing very highly, putting human LLM interactions at a disadvantage to human->LLM LLM interactions.

Thanks for teaching me the word ”litotically”!

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#103
post #6

"But the hardest lesson wasn't about database design. It was discovering that the real bottleneck wasn’t what we were observing and measuring."

It's honestly weird Claude converges on this language because it's incredibly wordy and hard to parse. One would think semantic density would win out in training.

Each version minor version of Claude has its own preferences for vocabulary.

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#104

Earlier quoted context omitted.

that's why I mentioned active carts in my post, there are ways to define active cart to get rid of abandoned carts ( ignore carts where last user action was > N seconds ago). Ok, let's accept the design goal that whoever paid first wins. You can use the same metric (how many milliseconds ago did user click PAY) and impose a global monotonic non-decreasing counter to distribute the scarce inventory. This is how order…

Most payment methods in the world don't support separate authorization and capture.

[deleted]

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#105

Earlier quoted context omitted.

that's why I mentioned active carts in my post, there are ways to define active cart to get rid of abandoned carts ( ignore carts where last user action was > N seconds ago). Ok, let's accept the design goal that whoever paid first wins. You can use the same metric (how many milliseconds ago did user click PAY) and impose a global monotonic non-decreasing counter to distribute the scarce inventory. This is how order…

Most payment methods in the world don't support separate authorization and capture.

i dont know about the world, by authorize.net and Stripe, which work globally and work with global credit cards, they do support separate authorize and separate capture, which seems to be part of PCI standard

https://docs.stripe.com/payments/place-a-hold-on-a-payment-m...

https://support.authorize.net/knowledgebase/Knowledgearticle...

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#106
post #6

"But the hardest lesson wasn't about database design. It was discovering that the real bottleneck wasn’t what we were observing and measuring."

But was it load bearing?

It needs a ledger

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#108
> 3. Consistent lock ordering: avoiding deadlocks

This section is badly written. For example, it refers to different table names than those previously introduced.

The slop shows. While I appreciate the post, I wonder why they didn't bother using an LLM in a way that would at least ensure internal consistency.

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#109

not the best design to have 1000 rows for each shop*SKU combination. If a candidate proposed this solution during Shopify's System Design interview, i doubt he would be vetted for Senior+ position. Instead of having 1000 rows per shop*SKU, why not just have one row per shopping cart*SKU? That way a single row would represent a single cart, and will hold info of multiple items of the same SKU. No need a cludge with 10…

Others are almost never as dumb as you hoped, and you’re rarely ever as smart as you think.

Re: We replaced Redis with MySQL for inventory reservations and it scaled

#110
post #13

The lengths companies will go to avoid running different pieces of software...

Most companies would be best served picking MySQL or PG and only adding something else if absolutely necessary. Every piece of software added increases complexity.
Post reply on HN