Skip to content
SD-38 · SOCIAL MARKETPLACE · INTERACTIVE

Break it.
Then fix it.

Turn up the buyers, watch what melts, and add the parts a real marketplace needs. Every switch is a decision you would defend in an interview.

CHALLENGEServe 20K searches/s with p99 under 200 ms, no errors, and a search index that stays in step with the database.
StatusDOWNAt 5K searches per second
Search p99500+ msTarget under 200 ms
Errors94%Searches being dropped
Sold items in searchNoNo index yet
Monthly cost$3,170Photos through app servers
BuyersLIVE
5.0K searches/s · 125 writes/s
traffic source
App servers × 13OK
Also streaming thumbnails
45K / 65K units/s
Listings DBDOWN
SQL LIKE + distance scans
5.0K scans/s
Search is a table scan. `title LIKE '%bike%'` with a distance box reads thousands of rows per search; one database manages about 300 a second. Use a search index built for words, filters and distance.
1 : 40Writes to searchesListings change rarely; search is the load.
50%Result cache hitsBrowsing a category in a city repeats; cache it for 60 seconds.
24Thumbnails a pagePhotos are most of the bytes, so they come from a CDN.
5 sIndex lagThe change stream moves sold items out of search within seconds.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.