The challenge
Annapurna runs 14 shops and an online store. During Dashain, traffic rises about twelve-fold over two weeks. The old platform had crashed at the peak two years running, each time on the most profitable days of the year.
The cause was not the number of visitors. Every page view checked live stock levels in a single database table, while all 14 shops were constantly updating the same table, and the two kept blocking each other.