Scrivio Interview library
ScenarioAdvanced6 min read · updated 13 November 2026

A messaging product has 50 million daily active users, each sending about 40 messages a day; a message with metadata and indexes takes about 500 bytes. Traffic grows about 40 percent a year, and the storage team must order capacity for the next three years.

Estimate write rates and storage for the three years, and say what you would validate before the order is placed.

Fifty million users sending 40 messages a day is 2 billion messages a day, about 23,000 writes per second on average and roughly 70,000 at a peak of 3 times. At 500 bytes each, that is about 1 TB a day: roughly 365 TB in year one, 510 TB in year two and 715 TB in year three with 40 percent growth, around 1.6 PB of logical data if nothing is deleted, close to 5 PB raw with three replicas and 30 to 50 percent more for compaction, rebuilds and imbalance. Before ordering, we validate bytes per message from production samples, confirm media is stored separately, settle the retention policy and measure compression, and we buy in stages rather than in one three-year order.

Why this question is asked

Capacity planning for storage is one of the few estimates in engineering where a wrong answer costs real money in both directions: order too little and the cluster fills up during a busy quarter, order too much and millions are spent on idle disks. Interviewers ask this to see whether we can carry an estimate across years with growth, account for replication and operational headroom, and recognise which assumptions dominate. In this answer, we will compute the write rate, the logical storage per year, the raw capacity, and then the checks to do before anyone signs a purchase order.

1Write Rate: Average and Peak

We begin with messages per day and convert to a rate.

Text
messages per day = 50,000,000 users x 40 = 2,000,000,000
average writes = 2,000,000,000 / 86,400 s = about 23,000/s
peak (3x) = 23,000 x 3 = about 70,000/s
in year three = 70,000 x 1.4 x 1.4 = about 137,000/s at peak

A peak of about 3 times the average is a reasonable assumption for a messaging product, which is busiest in the evening across a few time zones and has spikes around holidays and major events. The year-three line matters because the write rate grows with traffic too; a storage cluster sized for today's 70,000 writes per second at peak needs nearly twice that in two years.

2Logical Storage Over Three Years

Each message with its metadata and indexes takes about 500 bytes. Two billion of them is 1 TB a day, roughly 365 TB in the first year. With traffic growing 40 percent a year, the second year adds 365 times 1.4, about 510 TB, and the third adds 510 times 1.4, about 715 TB. If nothing is ever deleted, the total after three years is about 1.6 PB of logical data, meaning each message counted once.

Storage plan with 40 percent yearly growth
YearAdded logicalCumulative logicalRaw with 3 replicas
1365 TB365 TBabout 1.1 PB
2510 TB875 TBabout 2.6 PB
3715 TBabout 1.6 PBabout 4.8 PB
3, plus 30 to 50 percent headroom--about 6.2 to 7.2 PB

3From Logical to Raw Capacity

Messaging stores such as Cassandra or ScyllaDB usually keep three replicas of every row, so 1.6 PB of logical data needs about 4.8 PB of disk, near 5 PB. That is still not the number to order, because a disk that is full cannot be operated.

Three things need spare space. Compaction in log-structured stores, which merge sorted files in the background, temporarily needs room for both the old and the new files; depending on the compaction strategy, that can be a sizable fraction of the data on each node. When a node fails, its data is rebuilt onto the remaining nodes, which must have room for it. And data never spreads perfectly evenly, so the fullest nodes run out first. Together these typically add 30 to 50 percent, bringing the raw figure to roughly 6 to 7 PB by the end of year three.

4What to Validate Before Placing the Order

Every number above rests on a few assumptions, and some of them move the total far more than others. Before ordering, we check the dominant ones with real data.

Bytes per message: 500 bytes is an estimate. We sample a few million real messages from production and measure the stored size including indexes and metadata, per message type. Media handling: if images or voice notes are stored inline rather than as references to object storage, the number is wrong by orders of magnitude, so we confirm media lives separately. Retention: if the product keeps messages for one year, or deletes them after delivery, the total changes completely. Compression: text compresses well; if the store compresses blocks with LZ4 or Zstandard, the on-disk size might be half or less of the logical size, which we measure on real data rather than assume.

Step throughChecks before the order
  1. Measure bytes per messageSample production data, by type
  2. Media stored separately?Images and voice must be references
    YesKeep the 500-byte basisNoRe-estimate with media sizes
  3. Confirm the retention policyForever, one year, or until delivered
  4. Measure compression on real dataLZ4 or Zstandard ratio
  5. Recompute and buy the first stageCheckpoint before the next

5 steps in order. Play them, or step through them one at a time.

5Buy in Stages, Tier Old Data

Even with validated inputs, a three-year forecast of 40 percent growth is a guess. A single order for year three's capacity locks money into disks that sit empty for two years, at prices that usually fall over time. A better plan buys capacity for the next 9 to 12 months plus lead time, with checkpoints each quarter where actual growth is compared with the forecast and the next order is adjusted.

We also tier the data. Messages older than a few months are rarely read, so they can move to cheaper storage, such as dense disks or object storage, while recent messages stay on fast SSDs. This lowers the cost of the bulk of the data without affecting the experience of reading recent conversations.

6Follow-up questions

How does a one-year retention rule change the order?

With a one-year limit, the store holds at most the last twelve months of messages, so the stored amount stops accumulating. At the end of year three that is roughly year three's volume, about 715 TB logical, or around 2.1 PB raw with three replicas and about 3 PB with headroom, less than half the 'keep forever' plan. The write rate is unchanged, and deletions add work: in log-structured stores, expired data must be removed by compaction, so we would use time-to-live with a time-window compaction strategy that drops whole expired files instead of writing tombstones row by row.

Why not compute growth as compound monthly instead of yearly steps?

It would be slightly more accurate, but the inputs are not precise enough for it to matter. Yearly steps are easy to say aloud and the difference is well within the uncertainty of the 40 percent forecast.

What if the peak write rate exceeds what the cluster can handle before disk fills up?

Then node count is set by write throughput rather than disk, and we size for both and take the larger. It is worth checking because SSD-backed clusters often hit CPU or compaction limits before capacity limits.

7Conclusion

In this answer, we estimated 2 billion messages a day, about 23,000 writes per second on average and 70,000 at peak, growing with traffic. Storage grows by about 365, 510 and 715 TB over three years, around 1.6 PB logical and nearly 5 PB raw with three replicas, plus 30 to 50 percent for compaction, rebuilds and imbalance. Before ordering, we validate bytes per message, media handling, retention and compression, then buy in stages with checkpoints and tier older messages to cheaper storage.

What to say in the interviewAbout 80 seconds aloud

Open with

Fifty million users times forty messages is two billion messages a day. Divided by 86,400 seconds that is about 23,000 writes a second on average, and with a peak of about three times, roughly 70,000 a second, growing with traffic each year.

Then, if they want more

At 500 bytes per message, two billion is about a terabyte a day, so around 365 terabytes in year one. With forty percent growth, year two adds about 510 and year three about 715, so roughly 1.6 petabytes of logical data if nothing is ever deleted.

With three replicas that is close to five petabytes of disk, and I would add thirty to fifty percent for compaction space, rebuilding after node loss and uneven distribution. Before the order is placed, I would validate the assumptions that dominate.

Measure the real bytes per message from production samples, confirm media is stored separately as references, get a clear retention policy, because a one-year limit cuts the total by more than half, and measure the compression ratio on real data. And I would not place one three-year order.

I would buy for the next nine to twelve months plus lead time, compare actual growth with the forecast every quarter, and move messages older than a few months to cheaper storage.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Estimate write rates and storage for the three years, and say what you would validate...": https://scrivio-interview-library.netlify.app/architecture/sd-fundamentals/986909ea4a/