IOPS, bandwidth and storage
We count the resources carrying each operation. Request rate alone cannot size a disk or a network link. We will connect operation size to IOPS, payload rate to bandwidth, and logical records to retained storage.
#Section 11IOPS and operation size
A disk copies a long file efficiently but stalls when Heron requests unrelated pages. IOPS means input/output operations completed per second. Bandwidth means bytes transferred per second. They describe different limits, connected by how much data each operation transfers.
Assume an illustrative device completes 2,000 reads per second and each read transfers 4 KiB. A KiB is 1,024 bytes, so each read is 4,096 bytes. The transferred data rate is bytes per second. This is 8.192 decimal MB per second, before any extra work outside those reads.
Read this as: byte rate equals operation rate times bytes per operation . The relationship only describes the counted operations. It does not predict a device's capacity without operation size, read/write mix, locality, queue depth, and durability behavior.
A database query is not one I/O by definition. Its pages may already be in memory, it may read several pages, or it may initiate additional work to maintain indexes and logs. Measure physical operations at the storage boundary. Translate application queries into that work before comparing the workload with a device limit.
#Section 12Locality, caching, and durable writes
Heron's recent match events sit near each other, while unrelated profile lookups touch scattered pages. Locality means work reuses nearby or recently accessed data. Sequential access can combine requests into larger transfers; random access makes the system locate different regions more often.
An illustrative 64 KiB contiguous region contains 16 pages of 4 KiB. Reading it in one larger operation changes the operation count while transferring the same payload. It can also read bytes the caller never uses, so fewer operations do not always mean less total work. The access pattern determines whether that trade helps.
A cache hit means the requested data is already available in the measured cache. Suppose each query references four pages and 90% of those page references hit memory. At 1,000 queries per second, the expected physical read demand is pages per second. This simple model assumes the given hit ratio remains valid under the workload.
Durable writes add a different requirement. The caller may need acknowledgement after data reaches the chosen persistence boundary, rather than after it enters a volatile buffer. Grouping writes can reduce flush operations, but it introduces waiting and recovery rules. Keep read misses, log writes, data writes, and background compaction as separate demands.
#Section 13Bandwidth and fan-out bytes
Heron's API responses are small, but a live event must reach many viewers. Bandwidth demand depends on payload size and recipient count as well as event production. Count bytes at the actual transfer boundary before comparing that demand with a link's capacity.
At 1,000 requests per second and 2,000 payload bytes per response, API payload is 2,000,000 bytes per second. Multiplying by eight gives 16,000,000 bits per second. These counts exclude request bodies, headers, TLS records, acknowledgements, retransmissions, and any inter-service copies of the response.
The live path produces 20 events per second for 50,000 viewers. That is 1,000,000 deliveries per second. Each carries an illustrative 200-byte payload, yielding 200,000,000 bytes per second, or 1,600,000,000 bits per second. Payload alone exceeds an illustrative 1,000,000,000-bit-per-second link by a factor of 1.6.
Sending each event to five gateways costs only payload bytes per second on that particular upstream path. The gateways then perform the large viewer fan-out. Draw both boundaries before sizing them. Moving the fan-out changes which machines pay the delivery cost; it does not eliminate those deliveries.
#Section 14Retained storage and physical overhead
Suppose a separate illustrative write workload stores a 500-byte record for every daily request. A score read does not necessarily do this; we introduce the assumption to practice storage accounting. Daily logical data is bytes.
With 30 days retained, one logical copy contains 129,600,000,000 bytes. With three replicas, the payload occupies 388,800,000,000 bytes, or 388.8 decimal GB. This is approximately 362.0982 GiB, rounded to four decimals. The unit conversion changes the reported number, not the actual bytes.
Now assume index data adds 20% of logical record bytes and uses the same replication factor. Records plus indexes occupy bytes. The index ratio is illustrative. Real indexes depend on keys, pointers, page layout, compression, and update behavior.
Add logs, backups, temporary rebuild space, compaction overlap, page slack, and deletion delay using explicit measurements or assumptions. A retention policy states when data becomes eligible for removal; it may not reclaim physical bytes immediately. Recovery also needs free space. A disk filled to the exact retained-data total cannot safely perform every maintenance operation.
#Section 15Cache size and the working set
A cache containing Heron’s latest scores does not need every historical database record. The working set is the data actively needed during the workload’s relevant interval. A cache budget begins with which keys are useful, how many exist, and how long they remain useful.
Assume 100,000 entries, each with a 2,000-byte payload and 100 bytes of combined key and bookkeeping overhead. Payload alone is 200,000,000 bytes. The entries together occupy 210,000,000 bytes. An additional identical replica doubles that counted storage to 420,000,000 bytes before allocator slack and process overhead.
A server also stores connection buffers, executable code, temporary objects, and housekeeping structures. Cache entry bytes are not the whole process footprint. Use measured resident memory under a representative key distribution, including deletion and replacement activity. Large values or unusually long keys can invalidate an average-entry assumption.
Eviction bounds memory but changes hit rate. If the hottest keys stay resident, a modest cache can remove much database work. If a burst cycles through previously unseen keys, the same memory budget yields many misses. Measure distinct keys, value-size distribution, and miss traffic together instead of treating cache capacity as a hit-rate guarantee.