All levelsMusic app · 1

Split the monolith

IntermediateBeta

You 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.

  1. Users2,400 req/s
  2. Edge
  3. App
  4. CacheEmpty
  5. Data

Capacities and costs are game values, not real benchmarks.

Credits 0/5

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.
0
Playback server
2 creditsRuns playback requests only.
0

Tap one server on the board to size it on its own.

Search server
2 creditsRuns search requests only.
0
Any-request server
2 creditsRuns whatever the load balancer or gateway sends it.
5
Size, all 5
3,000 req/s total
Load balancer20,000 req/s
2 creditsSpreads requests across your app servers.
Always 1
Database
2 creditsStores your data. Every write goes here.
Always 1
Size
1,000 ops/s