The Real Fullstack

Design a URL Shortener

Redirects must be instant and codes must never collide. Where does each requirement live in your architecture?

Ingénieur12 minConstructeur d'architecture
redispostgresqlkafkaload-balancer

Ce défi n'est pas encore traduit en Français. Vous lisez la version anglaise.

Mission:Assemble an architecture that satisfies every requirement: entry through a load balancer, durable storage, cached hot reads, collision-free key generation, asynchronous analytics, no public database — within budget.Contexte · Objectifs d'apprentissage ▾

Snip.example, a fictional link service, expects about 100 redirects for every new link. Marketing wants click analytics, but analytics must never slow down a redirect. The infrastructure budget is 20 units.

Mission: Assemble an architecture that satisfies every requirement: entry through a load balancer, durable storage, cached hot reads, collision-free key generation, asynchronous analytics, no public database — within budget.

Objectifs d'apprentissage

  • Translate requirements into components and connections.
  • Separate the read path from the write path.
  • Move non-critical work off the request path with a queue.
SimulationSimulé
Clients → Load balancerClients → Redirect serviceClients → Links DBLoad balancer → Redirect serviceRedirect service → RedisRedirect service → Links DBRedirect service → Key generatorRedirect service → Click queueClick queue → Analytics workerAnalytics worker → Analytics storeRedirect service → Analytics storeClients → CDNCDN → Load balancerClientsCDNLoad balancerRedirect serviceRedisLinks DBKey generatorClick queueAnalytics workerAnalytics store

Sélectionnez composants et connexions. Clavier : utilisez les listes sous le diagramme.

Lancer la simulation

Lancez la simulation pour voir la sortie.

Simplification

Requirements are checked structurally (paths and forbidden links), and costs are abstract units. Real designs need capacity estimates per component. Modèle pédagogique — les chiffres illustrent un comportement, ce ne sont pas des benchmarks.

Concepts

Défis liés

Références