1 Trillion Scale for Tiny URL system : The System Design Answer That Actually Passes (The hard way)

Опубликовано: 17 Май 2026
на канале: FAANG Senior Engineer
9,767
446

Most system design answers for TinyURL are wrong at scale. Not wrong in theory — wrong in physics. The moment you put a trillion URLs in the constraints, everything you learned about MD5 hashing and "check-then-insert" breaks down mathematically.

In this video I walk through what actually changes:

▸ Why truncated MD5 hashes cause guaranteed collisions (Birthday Paradox)
▸ How Base-62 encoding maps integers to 7-char strings with zero DB lookups
▸ Distributed range management with ZooKeeper — reducing coordination by 1,000,000×
▸ Why Cassandra beats Postgres for this exact write profile (LSM-trees vs B-trees)
▸ The 99/1 read distribution and how Redis handles it with 10GB of RAM
▸ Feistel ciphers — the cryptographic trick that hides sequential IDs from attackers
▸ CAP theorem tradeoffs for a globally distributed redirect service

This is the Reductionist Mindset: you can't brute-force trillion-scale problems with more code. You find the abstraction that makes the problem small again.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📄 PAPERS & REFERENCES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

** Birthday Paradox (hash collision probability):
https://en.wikipedia.org/wiki/Birthda...

** Feistel Cipher — original 1973 paper by Horst Feistel:
"Cryptography and Computer Privacy," Scientific American, Vol. 228, No. 5 (May 1973), pp. 15–23
https://www.jstor.org/stable/24923044

** Feistel Cipher overview (Wikipedia):
https://en.wikipedia.org/wiki/Feistel...

** MIT Technology Review — history of the Feistel network:
https://www.technologyreview.com/2022...


If this helped you think differently about scale, subscribe — more system design deep dives like this every week.

#SystemDesign #SoftwareEngineering #DistributedSystems #URLShortener #TinyURL #BackendDevelopment #CodingInterview #TechInterview #FAANG #LeetCode #DatabaseDesign #Redis #Cassandra #ZooKeeper #Base62 #FeistelCipher #Cryptography #BirthdayParadox #ScaleableArchitecture #SoftwareArchitecture #CloudComputing #ByteByteGo #Karpathy #CS #ComputerScience #Programming #Developer #BigData #CAPTheorem #DataEngineering