Todos los ejemplos

Ejemplos

Cómo un acortador de URL soporta mil millones de clics

Un enlace corto resuelto por una API y una base de datos, luego una caché para los enlaces populares, un balanceador de carga sobre dos API y una API que falla mientras el tráfico pasa a la otra.

Este video se hizo con la habilidad Diseño de sistemas.

  • 1:11
  • Diseño de sistemas
  • Narrado por Charon
  • Inglés

Hecho a partir de un prompt

How does a URL shortener handle a billion clicks? Show the read path, a cache, and scaling out.

Transcripción del video

A billion clicks a day: your short links must redirect without overwhelming storage.

Your browser calls an API. The API reads the destination from a database, then returns a redirect.

That averages over eleven thousand requests per second. Here, database lookups take eighty milliseconds. Storage becomes the bottleneck.

Add a cache for popular links. On a miss, read the database, then cache the destination.

Cache hits take two milliseconds here, skipping storage. Expire entries and invalidate changed links; cached destinations can become stale.

Add a load balancer, then another stateless API. Both share storage. Extra servers cost more.

What if one API fails? Health checks remove it; traffic moves to the survivor. Keep spare capacity.

Browsers request redirects. The balancer distributes clicks, APIs resolve links, the cache skips reads, and the database keeps mappings.

Tu tema, dibujado en un minuto, más o menos.

Tus primeros 2 videos son gratis, de hasta 1 minuto cada uno, con marca de agua. No necesitas tarjeta. Producto completo, con todas las voces y estilos incluidos.