The Real Fullstack

The Slow Checkout Trace

Frontend blames the API, the API blames the database, the database blames the network. The trace disagrees with all of them.

アーキテクト15 分デバッグラボパフォーマンスラボフローシミュレーター
opentelemetryangularspring-bootpostgresql

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

ミッション:Read the trace end to end, name the root cause, and fix every layer the trace points to without papering over it with caches.背景 · 学習目標 ▾

Hollow Basket's checkout page takes 6.8 s. An OpenTelemetry trace covers the browser, gateway, cart API and PostgreSQL. Each team has a favourite fix — a bigger cache, more replicas, a CDN — but nobody has read the whole trace.

ミッション: Read the trace end to end, name the root cause, and fix every layer the trace points to without papering over it with caches.

学習目標

  • Use a distributed trace to follow one request across layers.
  • Fix N+1 queries and the missing index they hit.
  • Parallelise independent frontend requests and split heavy bundles.
シミュレーションシミュレーション値
shopperAngular SPAAPI gatewaycart APIPostgreSQLtracing backend
シミュレーションを実行
@Query("select c from Cart c join fetch c.items i join fetch i.product where c.id = :id")Optional<Cart> findWithItems(@Param("id") long id);      // 1 query instead of 1 + 87

簡略化

Four symptoms with deterministic fixes. Real traces need sampling and consistent context propagation. 教育用モデルです。数値は挙動を示すためのもので、ベンチマークではありません。

コンセプト

先に取り組むと役立つ課題

関連する課題

参考資料