scott francis
510 posts

scott francis
@planetscott
[email protected], enjoys computers, former Principal Production Engineer @ Shopify, ex-IBM, zinc-deficient
🇨🇦 เข้าร่วม Kasım 2008
195 กำลังติดตาม511 ผู้ติดตาม

You work for a site that drops limited-edition sneakers.
Tomorrow, you're releasing a shoe. There are only 1,000 pairs in stock.
A million users are on the product page, waiting. The timer hits zero.
Your system is instantly hit with 500,000 concurrent requests to "add to cart." A simple UPDATE inventory query leads to a massive race condition.
In the chaos, the system oversells 5,000 pairs. It’s a PR and logistics disaster.
How do you design a system that can handle this traffic and sell exactly 1,000 pairs without crashing or overselling?
English

I would not be surprised if the current @Reddit outage was caused by the blackout protest from some of the larger subreddits. I could see the balancing/indexing of those subreddits being fairly bespoke, and now that they’re private it’s wrecking havoc on feed generation/caching
English

@nateberkopec Way back in the day at Shopify @harrybrundage printed out and taped pages and pages of request logs to the wall. We would go through them to find queries to cache with identity cache. It works!
English

@geejmasterflex IIRC you could cache=false it but there was still another caching layer in front of the database, specifically for endpoints like products.json
English

@geejmasterflex Y’all caused a lot of mischief with your attempts to fetch uncached product endpoints. There was a bunch of stuff we did there too
English

The reason Shopify can handle sales like this is the result of years of building up their systems and learning many painful lessons. A brief thread…
Logan Martel@martelogan
Killer to see the payoff for years of engineering Smoothest Checkout in the world now proven on Shopify for the world's largest flash-seller 🏔️
English

