Top
Best
New

Posted by adletbalzhanov 10 hours ago

Shopify replaced Redis with MySQL for inventory reservations–and it scaled(shopify.engineering)
176 points | 98 commentspage 2
shay_ker 7 hours ago|
outside the slop, i liked this post that was linked on innodb locking: https://jahfer.com/posts/innodb-locks/
culi 6 hours ago||
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
nozzlegear 5 hours ago||
This is Shopify, the leadership is full steam ahead on AI in a big way and they review employee performance based on AI usage.
throwatdem12311 4 hours ago||
And Lutke is a fascist.

All the biggest proponents of AI seem to be fascists.

Weird.

tayo42 6 hours ago||
The blog probably was.shopify was pretty early and publicly all in on using AI for everything
tailscaler2026 7 hours ago||
[dead]
skullone 7 hours ago||
[flagged]
trueno 7 hours ago||
so this is interesting to me, im in retail i work closely with platforms ive used shopify ive used magento ive used smaller players ive helped implement various pieces of all of them.

and i was excited to get some insight, then i realized that this whole thing was written by AI and im going to guess the idea and implementation were probably very AI driven.

> The solution: SKIP LOCKED > Core idea: one row per unit, bounded by design

cool, thanks claude.

Now I'm wondering what the engineering culture is even like at shopify.

Here's the thing. I like databases, I think there's a lot of shit in this space that went and smoked a shit ton their own good stuff to come up with these pure event driven designs that lock you into event workflows with no isolation and remove the ability to do broader bulk-functions.. and then do something even stupider and say "all you need for the interface is graphql" and such service/platform doesn't give you any other way to reconcile or do reporting for your org you have to warehouse from graphql.. this is crap. So seeing a headline where shopify says they want to kinda get behind a unified database strat behind the scenes even if it's not necessarily customer facing, like that's good imo. SQL is many decades of relational algebra that makes insane computations acrossed vast sets of data pure magic and one of the best query dml interfaces of all time.

..however i dont even agree with the claim their making here that redis isnt the tech for a reservation system. redis when used correctly feels like an insanely awesome way to do a reservation system, i lurv redis for stuff like that.

I'm just gonna go forward with the assumption that current and future shopify updates are pure vibeslop. I already hate their data interfaces, but compared to other saas offerings i appreciate that they do have bulk-features.

akamaka 7 hours ago||
I found Shopify’s post very easy to read, and learned about some features of MySQL. On the other hand, I didn’t get any value from reading your comment. You seem to have a bunch of opinions about how things should be done, but haven’t given any details about how you came to these conclusions.
trueno 4 hours ago|||
I've done multiple large scale implementations with shopify paired with many flavors of order managmeent systems as well as competing offerings in the space. The only one i haven't touched that i'd like to get my feet wet with is commerce tools.

I really just disagreed with the assessment that redis is not good enough for the job for a reservation system. I use sql database all the time, I prefer them. But I'm seeing a claude written article here that seems to heel turn on a proven technology, it would at most be insightful if there was human content in here from actual engineers at shopify who want to vouch for and explain the challenges they were up against with redis rather than just expect me to take claudes word for it. Anyone who's been dabbling with AI knows damn well that you can convince claude to write up a dissertation on any hill you want to die on.

dawnerd 4 hours ago|||
I found it really hard to read, the llm-isms are just too distracting. Does no one proof blog posts anymore?
benmmurphy 6 hours ago|||
You should be able to do these increments/decrements in a database at the rate you can write WAL to the disk. But the problem is in a lot of these databases the transaction will hold locks until the WAL hits the disk which causes a massive serialisation problem when you have lots of writes to the same row.

For example if it takes 20ms to write a batch to the WAL then if you do 5 updates to the same row then that is a minimum of 100ms. But without waiting on locks if you can batch all the WAL writes together then this could be just 20ms.

I don’t think holding locks while waiting for WAL is strictly necessary. There is definitely some anomalies that can happen if you don’t wait for WAL to be durable because transactions that don’t write WAL can observe non-durable writes in some situations. So for example conditional updates that don’t perform work. But I assume this can be fixed by making these wait on the commit for dependent transactions to become durable if they are empty. There is also the problem of failing writes that reveal information about non-durable writes which is more tricky. For example you try to insert into a unique index and it fails, but the duplicate was due to a non-durable write that is lost.

Pure reads should be fine when using MVCC because you just show the latest durable version of the DB. I know some other replication systems will run all transactions including reads through the WAL/replicated log in order to not have anomalies.

__s 3 hours ago|||
Example of their culture: https://x.com/tobi/status/1909251946235437514
tybit 7 hours ago||
They do heavily use AI, but you haven’t refuted their point that if inventory is in SQL, storing reservation in a second storage system increases complexity.
trueno 4 hours ago||
I mean I'm all for everything collapsing into sql. SQL all the things. Not really against it, I'd just rather not-AI write the challenges they were up against. It seems like these are all very behind-the-scenes scaling issues they faced, so it'd be cool to hear from them. Redis has great qualities, I don't use it often but I've also for years now understood why Redis was put in front of these use cases to handle them. Complexity be damned generally you're trying to enforce a first come first served or some level of idempotent behavior, so if sqls doing that now then hell yeah. It's just super off-putting to try and upend an important design pattern with an AI written article.
kennywinker 7 hours ago|
Shopify’s founder and their coo both fund far-right extremism, and its founder thinks only rich people should be able to vote. But anyway, they switched databases.

https://www.techwontsave.us/episode/340_shopifys_leaders_are...

annexrichmond 4 hours ago||
The link you shared is just a podcast and does not contain even contain “far right”. Can you provide specific concerns, otherwise I don’t see anything wrong with a CEO of the most successful tech company should not be concerned about a horribly performing country from a GDP perspective.
kennywinker 3 hours ago|||
I included a link to a podcast because that's a good high level overview of the topic. If you want to dig into it further, the podcast episode page I linked to has links to more reporting and plenty of keywords you can type into google.com if that's not enough.

But here's another link if you need something that includes the phrase "far right": https://pressprogress.ca/shopify-executives-right-wing-media...

Anyway, if you think a country having a low gdp per capita is how you measure if it should suspend voting rights for disabled people and stay at home parents, then I suspect you're not actually reading any of this.

croes 4 hours ago|||
You should be concerned what they spot as the problem and what they propose as the solution

https://www.ctvnews.ca/business/article/shopify-ceo-draws-cr...

annexrichmond 3 hours ago||
[dead]
stiltzkin 7 hours ago|||
[dead]
hdndjsbbs 7 hours ago||
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.
chucksmash 5 hours ago|||
Don't get shy now. Which slurs?
KingMob 5 hours ago||
Why are you trying to get someone to repeat slurs?
chucksmash 4 hours ago||
Because "slurs" is vague and covers a wide variety of utterances that run the gamut from unprofessional to unemployable and I had a tingle of Spidey sense that OP might have chosen the vague phrasing specifically to inflate the sins of the nameless Shopify director in the mind of the reader.
kennywinker 4 hours ago|||
Which slurs are ok, and which aren't?
chucksmash 3 hours ago||
Great question. It's a vague term and a moving target that not everyone agrees on.

For instance, retarded is now considered a slur. If OP is saying "my director said the R word," then I would question whether OP spared the gory details out of concern for polite company or if they're being oblique in service of their point.

And if managers at Shopify are dropping N-bombs, I want to know that too.

KingMob 3 hours ago|||
I... guess that's possible? Summarization doesn't really seem suspicious to me.
derwiki 7 hours ago|||
Are you implying that vaping is far right?
kennywinker 6 hours ago|||
I think that was part of the “bro” bit, not the far right bit
nozzlegear 5 hours ago|||
Sounded to me like they were saying people vape in the office, which would make a bad work environment on top of the far right bros.