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
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 ...
that a great blog. Keep the good work. Would love to see more of these !
Very informative blog
Well written article in great detail.
Thanks for sharing this blog Ashish
Nice Work!
very helpful
Amazing!! Thank you for sharing.
gajab brother maza aa gya
This is the best tiny url content i have seen so far, great going, keep it up.
Great breakdown, Ashish!
Keep these coming.
A 7-character Base62 string can represent approximately 3.5 billion unique URLs (62^7).
= ~3.5 trillion NOT billion
On correction in calculation. 62 ^ 7 is actually 3.5 trillion not 3.5 billion
I want to take 1:1 mentorship from you. Is that possible?
Thanks great article!
One question: I encoded "1" to base62 and got "1" instead of a unique shortened URL?
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
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 ...