They were really so proud of that AI image that they just had to tack it on at the end? Did nothing but make the blog post feel like cheap mass produced slop
We replaced Redis with MySQL for inventory reservations and it scaled
41–50 of 281 posts
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#42Earlier quoted context omitted.
Yeah it's an awful place to work unless you're a far-right bro. My old director used to use slurs and vape in the office. The founder hires pro gamers with no technical expertise because he thinks they're cool.
Are you implying that vaping is far right?
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#43> Instead of one row per item with a quantity column, we use one row per sellable unit. An item with 10 units has 10 rows. > But one row per unit for all inventory would break down at scale—an item with 50,000 units across 10 locations would mean 500,000 rows, and the reserve query would slow as it scans through them. Instead, we maintain a bounded pool of available rows, capped at 1,000 per item/location combination…
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#44Earlier 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.
[flagged]
First, "the hardest lesson". What lesson? It is out of context. Nobody was talking about lessons before this.
Second, "the bottleneck wasn't what we were measuring and observing". Of course the bottleneck itself wasn't that. They couldn't discover what the bottleneck was using the information in their measurements and observations.
It is a clunky and frankly incorrect passage in an otherwise well written article.
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#45Earlier quoted context omitted.
Can you clarify why this involves no locking? There can still be 2 actors fighting for the same row.
Two concurrent deductions of inventory do contend but only during the actual DB update. That is just normal DB locking for SQL isolation levels. The blog refers to explicit locking by the app, which is where skip locked comes in.
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#46Instead 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 1000 rows limit and replenishment process. Instead of dealing with N rows, you always deal with a single row.
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#47Re: We replaced Redis with MySQL for inventory reservations and it scaled
#48Re: We replaced Redis with MySQL for inventory reservations and it scaled
#49It seems there could be a simpler solution. 1. Deduct the reservation from the inventory when the user starts to order, but in the same txn also maintain a separate row for the in progress order flow. 2. If the order flow is aborted or times out have a background process that returns these to the inventory. That seems simpler than this approach and involves no locking. Though their presented approach is also reasonab…
I disagree with the other posters about the bg process, if you have any bg processing already you should be able to handle the few edge cases without too much trouble.
Re: We replaced Redis with MySQL for inventory reservations and it scaled
#50Earlier quoted context omitted.
Yeah it's an awful place to work unless you're a far-right bro. My old director used to use slurs and vape in the office. The founder hires pro gamers with no technical expertise because he thinks they're cool.
Don't get shy now. Which slurs?