~learn.
0:00 / 1:27
W01 · Data at scale

Same sessions: $2.50 an hour, or over $1,000

transcript

Same 10 million sessions. Same traffic. One design costs about 2 dollars 50 an hour. The other, over a thousand.

10 million users, about 2 kilobytes of session each. Every request reads a session. At peak, around 3 million reads a second. And each read must finish under 5 milliseconds, at p99. It's on every page.

Redis on 12 nodes, about 21 cents each. Roughly 2 dollars 50 an hour. DynamoDB with provisioned reads: about 390 dollars an hour at peak. On demand? About 1,350 an hour, just for the reads. And 2,250 an hour for the writes.

Why the gap? DynamoDB bills every operation. And you do 3 million a second. Its 5 to 10 milliseconds also busts a 5 millisecond target. Redis bills per node, not per read. The reads ride on hardware you already pay for. And reads come back in under a millisecond.

To be fair, DynamoDB is fully managed, durable, with Global Tables. You'd run the Redis cluster yourself. Pick it when multi-region writes and zero operations matter most. Here, they don't.

When every request reads it, price per read decides. About 2,000 dollars a month. Re-check it at 50 million sessions.

Full breakdown in the lecture.