All levelsMusic app · 1
Split the monolith
IntermediateBetaYou run a music app. At the evening peak, 1,800 people a second press play and 600 search, and a search costs five times the work of a play. Every server runs everything, and the budget can't cover it all. Songs must always play; search can slow down, as long as half of searches get through.
Builds on: Load balancing3 stars: serve each kind of request its share, keep every component at or below 90% except servers allowed to slow down, spend 3 credits or less.
- Users2,400 req/s
- Edge
- App
- CacheEmpty
- Data
Capacities and costs are game values, not real benchmarks.
Evening peak
Not tested
Sending traffic through your current setup…
- Throughput by requestNot tested
- Play a song–1,800 req/s · needs 100%Search–600 req/s · needs 50%
- Peak loadNot tested
- –Max 90%
- CostMet
- 0 creditsPar 3
Components
API gateway20,000 req/s
1 credit with the swapSends each kind of request to its own servers. Takes the load balancer's place.
Playback server
2 creditsRuns playback requests only.
Tap one server on the board to size it on its own.
Search server
2 creditsRuns search requests only.
Any-request server
2 creditsRuns whatever the load balancer or gateway sends it.
Size, all 53,000 req/s total
Load balancer20,000 req/s
2 creditsSpreads requests across your app servers.
Database
2 creditsStores your data. Every write goes here.
Size1,000 ops/s