
System Design Drill Day 14: URL Shortener and Unique ID Generation
How to design a URL shortener: base62 codes, ID generation strategies, 301 vs 302 redirects, Redis caching and async click analytics.
Csharpcorner MVP |Software Engineer|IOT| Azure|microbit| Web Developer | Udacity Scholar

How to design a URL shortener: base62 codes, ID generation strategies, 301 vs 302 redirects, Redis caching and async click analytics.
How to design a notification service with per-channel workers, priority queues, preferences, dedup and signed webhook retries.

How sagas replace distributed transactions with local steps and compensations, using a multi-step checkout as the example.

Why writing to the database and pushing to a queue can't be atomic, and how a transactional outbox fixes lost and phantom events.

How circuit breakers, timeouts and bulkheads keep a checkout alive when the payment gateway or SMS provider starts failing.

Why retries make duplicates inevitable, and how idempotency keys stop double charges and double stock decrements.

How distributed locks work with Redis SET NX EX, why leases and fencing tokens matter, and where locks fit in a checkout.

The main rate-limiting algorithms, how to run them atomically across servers with Redis and Lua, and when to fail open or closed.

How to split a MySQL orders table across shards: choosing a shard key, routing with logical shards, keeping reports off the shards and resharding.
