Mediumsystem-designcdnstatic
CDN and object storage
Acceptance: —Solved by: 0
Statement
A photo gallery: 10 000 requests/s, 70 % of them images and static files. Object storage serves at most 5000 requests/s, so static traffic has to be caught closer to the user — in a CDN. A CDN serves 90 % of static requests itself. It may have two origins: object storage (for static) and a load balancer or app server for dynamic traffic. Writes cost 3× reads — pick the database tier accordingly.
Constraints
- p95 ≤ 250 ms, errors ≤ 0.1 %, budget $2400/month, ≤ 5 instances per node.