Please enable JavaScript.
Coggle requires JavaScript to display documents.
System design - Coggle Diagram
System design
YouTube
-
-
-
-
Low latency , availability , reliability
-
resource estimation
CPU bound req, say take 200ms
-
Mem bound, say each worker takes 300MB and 50 ms
for a 256GB RAM, 16 GB for OS, 16000 RPS
for 500M DAUs, at peak load, if all requests arrive at the same second =>
so a server that size, assuming 50/50 CPU vs Mem bound requests, it can handle 8000+180 RPS = ~8000 RPS
-
Building blocks
-
HTTP Push & Pull
HTTP Pull
AJAX Polling
AJAx sends req at intervals using XMLHttpRequest object, , callback updates web page.
With PULL, there''s TTL (30-60sec (up to browser)) so the server doesnt run out of memory from open cnxns
-
-
-
Spotify
Hermes protocol, which Spotify has developed from scratch using ZeroMQ and Protobuf
PostgreSQL & Cassandra are used by Spotify. Cassandra is preferred for content-based services such as searching the songs or retrieving metadata of the songs in run-time.
-
-