All levelsMusic app · 3

Play counts

IntermediateBeta

Your lyrics partner from the last level is in place. Now the music app counts every play for artists' analytics: each play sends 2 events, 3,600 a second, and today each one is written to the database. Keep every service at its share without going over budget.

Builds on: Caching, Services3 stars: serve each kind of request its share, keep every component at or below 90% except servers allowed to slow down, spend 6 credits or less.

  1. Users3,900 req/s
  2. Edge
  3. App
  4. AsyncEmpty
  5. Cache
  6. Data
  7. External

Capacities and costs are game values, not real benchmarks.

Credits 0/8

Counting plays

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%Show lyrics–1,500 req/s · needs 100%
Peak loadNot tested
–Max 90%
CostMet
0 creditsPar 6

Components

Playback server
2 creditsRuns playback requests only.
4
Size, all 4 · mixed now
2,100 req/s total

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

Search server
2 creditsRuns search requests only.
3
Size, all 3 · mixed now
300 req/s total
Lyrics server
2 creditsRuns lyrics requests only.
3
Size, all 3
1,800 req/s total
Any-request server
2 creditsRuns whatever the load balancer or gateway sends it.
0
Event stream
2 creditsKeeps every event in order. Each group of processors reads all of them; partitions set how many in a group can read at once.
0
Analytics processor1,250 events/s each
1 creditReads every event for analytics.
0
API gateway20,000 req/s
3 creditsSends each kind of request to its own servers. Takes the load balancer's place.
Always 1
Cache80% hit rate
3 creditsAnswers about 80% of reads from memory.
Always 1
Database
2 creditsStores your data. Every write goes here.
Always 1
Size
500 ops/s
Lyrics partner400 calls/s
0 creditsAnother company's service. You can't add more of it or make it bigger.
Always 1