Numbers to Knowchapter 2 of 4 · 3 lessons
Storage & Throughput
Reference numbers for back-of-envelope storage and bandwidth calculations.
Your product stores messages, and somebody asks how much disk you need for the year.
You do the sum in your head. A message is about 200 bytes, you handle 2 million a day, so 400 megabytes a day and about 150 gigabytes a year. Buy a terabyte and stop worrying.
Twelve months later the disk is full. The real figure was a little over 2 terabytes.
Your 200 bytes was the text of the message. It did not count the sender, the recipient, the timestamp, the read receipt, the two indexes over that table, the replica holding a second copy, or thirty days of backups. Every one of those is real disk, and together they were most of it.
Lessons
3 in this chapter- Sizing Data HonestlyDerive object sizes from their contents, then multiply by the overhead everyone forgets.3 min
- What One Machine Can DoSingle-node throughput ceilings tell you when sharding is real and when it's resume-driven.3 min
- From Estimates to ArchitectureThe point of the arithmetic is a decision: one box or many, cache or not, CDN or origin.3 min