Course contentsShow
← Cloud and Infrastructure
Lesson 2091 of 2,98944. Observability - TracingFree lesson

Zipkin Fundamentals

Distributed tracing system: architecture, storage backends, and integration patterns.

Zipkin Fundamentals

What you'll learn: How Zipkin's distributed tracing architecture collects, stores, and visualizes request flows across microservices.

What is Zipkin?

Zipkin is an open-source distributed tracing system originally developed by Twitter (inspired by Google's Dapper). Like Jaeger, it helps you troubleshoot latency problems in microservice architectures by tracking requests as they flow through multiple services. Think of it as a "package tracking system" for your API calls—you can see exactly where each request went and how long each stop took.

Zipkin Architecture

Zipkin follows a straightforward four-component model:

Instrumentation

Applications send trace data (spans) to Zipkin using instrumented libraries. Zipkin supports multiple protocols including HTTP, Kafka, and gRPC for span ingestion.

Collector

The collector validates and stores incoming spans. It's designed to be stateless and horizontally scalable, accepting spans over various transports.

Storage Backend

Zipkin supports pluggable storage:

  • In-memory (for testing only)
  • MySQL/MariaDB (relational, simpler ops)
  • Cassandra (high write throughput, distributed)
  • Elasticsearch (search-friendly, popular choice)

The storage choice impacts query performance and operational complexity—Elasticsearch offers rich search but requires more resources, while MySQL is simpler for smaller deployments.

UI and Query Service

Zipkin's web interface visualizes traces, showing service dependencies and timing breakdowns. The query API lets you search by service, span name, tags, or duration.

Integration Patterns

Zipkin integrates through:

  • Native clients in various languages
  • OpenTelemetry exporters (modern approach)
  • Sidecar proxies like Envoy for automatic instrumentation
  • Spring Cloud Sleuth for seamless Spring Boot integration

Key Takeaway: Zipkin provides a lightweight, proven distributed tracing solution with flexible storage backends and simple integration patterns—choose your storage based on scale needs and operational comfort.