Try
↑ ↓ move↵ openesc close

Interview prep / URL shortener

Junior · URL shortener · System design interview question

Estimate the load for a service that makes 100 million links a month.

Sketch your own answer first, then compare it with the one below.

A strong answer

A month is about 2.6 million seconds, so 100 million links is about 40 creations a second. If reads are 100 times writes, that is about 4,000 redirects a second on average, and a peak of several times that.

Storage is the other number. Five years of links is 6 billion records. At 500 bytes each that is about 3 terabytes. State your assumptions and invite the interviewer to change them.

Sources

Learn it by running it

The design a url shortener lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms