I’ve never written code, but I just passed a Google system design interview
interviewing.io2 pointsby asymptotic0 comments
1. Dropbox's peak traffic is 1,500 queries per second (QPS).
2. Average data transfer per query is 100 KB.
3. 50% of the traffic comes from North America, 25% from Europe, and 15% from Asia (remaining 10% from other regions, for pricing purposes put it into Asia's calculations).
--- Data transfer:
- North America: 1,500 QPS * 0.5 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 194.4 TB
- Europe: 1,500 QPS * 0.25 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 97.2 TB
- Asia: 1,500 QPS * 0.25 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 97.2 TB
Data transfer cost:
- North America: 194.4 TB * $0.085/GB = $16,524
- Europe: 97.2 TB * $0.085/GB = $8,262
- Asia: 97.2 TB * $0.120/GB = $11,664
Total data transfer cost: $16,524 + $8,262 + $7,006 = $36,200
HTTP requests:
Total requests: 1,500 QPS * 60 seconds * 60 minutes * 24 hours * 30 days = 3,888,000,000
Using the updated AWS CloudFront pricing (as of May 22, 2023):
- HTTP requests cost: 3,888,000,000 * $0.0075/10,000 = $2,916
Total estimated monthly cost for AWS CloudFront: $36,200 (data transfer) + $2,916 (HTTP requests) = $40k Data transfer:
- Total data transfer: 194.4 TB (NA) + 97.2 TB (EU) + 97.2 TB (Asia) = 388.8 TB
Using the updated AWS Global Accelerator pricing (as of May 22, 2023):
- Data transfer cost (averaged across regions): 388.8 TB * $0.035/GB = $13,608
- (Also need to add EC2 egress cost, 388.8 TB * $0.02/GB = $7,776
- Total data transfer cost = $21,384
Accelerator:
- Assuming 1 accelerator with 2 endpoints (1 for HTTP/2 and 1 for HTTP/3)
- Accelerator cost: 1 * $18/accelerator/day * 30 days = $540
Total estimated monthly cost for AWS Global Accelerator: $21,384 (data transfer) + $540 (accelerator) = $22k