Choose
Pick the option you would use at the current scale.
HOW TO USE THIS LAB
Pick the option you would use at the current scale.
Compare its benefit, cost and effect on the architecture.
Run failure drills and decide how the service should degrade.
Interactive workshop / 12 decisions
Choose an option, inspect its benefit and cost, then watch the system grow. There is no hidden perfect diagram. The reasoning is the lesson.
Decide what the first useful version must do before discussing infrastructure.
Choose realistic workload numbers so later decisions have a reason.
Translate product assumptions into requests per second, storage and cache pressure.
Adjust the inputs. These estimates guide decisions; they are not traffic guarantees.
Separate link creation from the latency-sensitive redirect path.
Model the lookup path, uniqueness and lifecycle fields explicitly.
Create a simple request path whose components can scale independently.
Protect the database and reduce redirect latency without losing correctness.
Protect creation and redirect capacity while treating legitimate traffic fairly.
Scale the read-heavy mapping store while keeping alias uniqueness correct.
Define degradation before retries and outages define it accidentally.
Make latency, errors, saturation and dependency behavior visible.
Choose a rollout and resilience baseline that the team can actually operate.
Failure drills / 05
A diagram is only a hypothesis until you ask what happens when a dependency slows down, disappears or receives unexpected load.
Redis stops accepting connections during peak redirect traffic.
Cache hit rate drops to zero. Database reads and redirect latency rise immediately.
One instance starts timing out after a deployment.
Tail latency and error rate rise only for requests routed to that instance.
Redirect requests jump to eight times their normal peak after a viral post.
Application concurrency, database connections and hot-key requests climb together.
A replica is 45 seconds behind the primary after heavy writes.
New links sometimes return not found when redirects read the stale replica.
One short code receives hundreds of thousands of redirects each second.
A single cache entry and network path become much hotter than the rest of the keyspace.