18 Comments

that a great blog. Keep the good work. Would love to see more of these !

Expand full comment

Very informative blog

Expand full comment

Well written article in great detail.

Expand full comment

Thanks for sharing this blog Ashish

Expand full comment

Nice Work!

Expand full comment

very helpful

Expand full comment

Amazing!! Thank you for sharing.

Expand full comment

gajab brother maza aa gya

Expand full comment

This is the best tiny url content i have seen so far, great going, keep it up.

Expand full comment

Great breakdown, Ashish!

Keep these coming.

Expand full comment

A 7-character Base62 string can represent approximately 3.5 billion unique URLs (62^7).

= ~3.5 trillion NOT billion

Expand full comment

On correction in calculation. 62 ^ 7 is actually 3.5 trillion not 3.5 billion

Expand full comment

I want to take 1:1 mentorship from you. Is that possible?

Expand full comment

Thanks great article!

One question: I encoded "1" to base62 and got "1" instead of a unique shortened URL?

Expand full comment

Hey Ashish,

Cache Capacity Estimation doesn’t seems correct to me.

We need to cache all hot URLs that are frequently accessed(READ) to cache. So we shouldn’t cache 20% of WRITE request per day, rather we should cache 20% of READ request per day.

Total cache memory required = 100M * 0.2 * 127 Bytes = 2,540 MB = 2.5 GB

Expand full comment

Url generation service and redirection service, use the same database, is this a good design ? is this not a violation of database per service pattern ...

Expand full comment