The Real Fullstack

Design a URL Shortener

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

エンジニア12 分アーキテクチャビルダー
redispostgresqlkafkaload-balancer

この課題はまだ日本語に翻訳されていません。英語版を表示しています。

ミッション: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.背景 · 学習目標 ▾

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.

ミッション: 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.

学習目標

  • 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.
シミュレーションシミュレーション値
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

コンポーネントと接続を選択します。キーボードでは図の下のリストを使ってください。

シミュレーションを実行

シミュレーションを実行すると出力が表示されます。

簡略化

Requirements are checked structurally (paths and forbidden links), and costs are abstract units. Real designs need capacity estimates per component. 教育用モデルです。数値は挙動を示すためのもので、ベンチマークではありません。

コンセプト

関連する課題

参考資料