DD
URL Shortener · Deep Dives
Deep Dives
Seven focused deep dives — short code generation, database sharding, caching, hot key mitigation, pre-generated keys, cold storage, and fault isolation.
Short Code Generation
Raw IDs, hashing, collision handling, UUID variants, Snowflake, and truncation tradeoffs.
Raw IDsHashingUUIDSnowflakeCollision
Open →
Database
DB choice, schema design, sharding strategy, consistent hashing, replication, and read-your-own-writes.
ShardingConsistent HashingReplicationSchema
Open →
Caching
Why to cache, cache sizing, eviction policy, and updated redirect flow with Redis.
RedisCache SizeEvictionRead Path
Open →
Peak Traffic
The spike problem, hot key detection, local app cache, Redis key replication, and broadcast promotion.
Hot KeyLocal CacheRedis ReplicationBroadcast
Open →
Pre-Generated Keys
Bloom filter for collision avoidance, pre-generated key pool, KGS design, Redis INCR vs KGS tradeoffs.
Bloom FilterKGSKey PoolRedis INCR
Open →
Cold Storage
Tiered storage for inactive URLs, detecting cold URLs, and storage cost reduction at scale.
Tiered StorageCold URLsS3Cost
Open →
Fault Isolation
Redis down, DB shard primary down, KGS down, and other failure scenario mitigations.
Redis DownShard FailureKGS DownCircuit Breaker
Open →