Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build and run a URL shortener that survives a replica dying: a stateless API behind a load balancer (2+ replicas via compose), a database for the mapping, a cache for hot redirects with a justified TTL, and a collision-free key-generation scheme. Prove statelessness by killing a replica under traffic. Include the back-of-the-envelope estimates that justify the design.
Replicas interchangeable behind a load balancer; killing one drops no sessions or data.
Hot redirects served cache-aside with a justified TTL; a flush degrades latency, not correctness.
Collision-free short-key scheme; the reasoning is documented.
Estimates (QPS, storage, read:write) stated and used to justify the architecture.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# Horizontally-scalable URL shortener ## Goal Build and run a URL shortener that survives a replica dying: a stateless API behind a load balancer (2+ replicas via compose), a database for the mapping, a cache for hot redirects with a justified TTL, and a collision-free key-generation scheme. Prove statelessness by killing a replica under traffic. Include the back-of-the-envelope estimates that justify the design. ## Acceptance criteria - [ ] Statelessness & scaling: Replicas interchangeable behind a load balancer; killing one drops no sessions or data. - [ ] Caching: Hot redirects served cache-aside with a justified TTL; a flush degrades latency, not correctness. - [ ] Key generation: Collision-free short-key scheme; the reasoning is documented. - [ ] Design justification: Estimates (QPS, storage, read:write) stated and used to justify the architecture. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.