Zipkin
Distributed tracing system for latency analysis and troubleshooting.
Overview
Zipkin is an open-source distributed tracing system originally developed by Twitter, designed to help developers understand the flow of requests through microservice architectures. It collects timing data from applications to identify latency problems and visualize how requests propagate across multiple services, making it invaluable for debugging complex distributed systems. Zipkin implements the OpenTracing standard and uses B3 propagation headers to correlate spans across service boundaries.
This Zipkin deployment provides a complete tracing infrastructure with an intuitive web interface for trace visualization and analysis. The system accepts trace data from applications via HTTP endpoints and stores timing information to help identify bottlenecks, failed requests, and performance degradation across your service mesh. Zipkin's lightweight architecture makes it particularly effective for capturing and analyzing request flows in real-time.
Development teams working with microservices, site reliability engineers debugging production issues, and platform teams implementing observability solutions will find Zipkin essential for understanding system behavior. The configuration uses in-memory storage for immediate setup and testing, while the web interface at port 9411 provides powerful search capabilities to filter traces by service, operation, duration, and custom tags.
Key Features
- Distributed trace collection with B3 propagation header support for cross-service correlation
- Interactive web UI for searching, filtering, and visualizing request traces across services
- JSON and Protobuf span ingestion via REST API endpoints for flexible client integration
- Service dependency mapping showing relationships and communication patterns between microservices
- Trace timeline visualization with detailed span information including duration and metadata
- In-memory storage backend for development and testing environments
- Support for custom tags and annotations to enrich trace data with business context
- Configurable sampling rates and trace retention policies for performance optimization
Common Use Cases
- 1Debugging latency issues in microservice architectures by identifying slow service calls
- 2Root cause analysis for failed requests across distributed systems and API gateways
- 3Performance optimization by analyzing request patterns and identifying bottlenecks
- 4Service dependency discovery and mapping for complex distributed applications
- 5Development environment tracing to understand application flow during feature development
- 6Production monitoring for SLA compliance and performance regression detection
- 7Integration testing verification to ensure proper trace propagation across service boundaries
Prerequisites
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration
- Minimum 512MB RAM allocation for trace storage and web interface operation
- Port 9411 available for Zipkin web UI and API endpoint access
- Application instrumentation with Zipkin-compatible tracing libraries
- Basic understanding of distributed tracing concepts and span relationships
- Network connectivity from monitored applications to Zipkin collector endpoint
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 zipkin: 3 image: openzipkin/zipkin:latest4 container_name: zipkin5 restart: unless-stopped6 environment: 7 STORAGE_TYPE: mem8 ports: 9 - "9411:9411"10 networks: 11 - zipkin-network1213networks: 14 zipkin-network: 15 driver: bridge.env Template
.env
1STORAGE_TYPE=memUsage Notes
- 1Docs: https://zipkin.io/
- 2UI at http://localhost:9411 - search and view traces
- 3In-memory storage by default - use Elasticsearch/Cassandra for production
- 4Send traces to POST /api/v2/spans in JSON or Protobuf
- 5B3 propagation format - widely supported in tracing libraries
- 6Lightweight and simple - good starting point for tracing
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 zipkin:5 image: openzipkin/zipkin:latest6 container_name: zipkin7 restart: unless-stopped8 environment:9 STORAGE_TYPE: mem10 ports:11 - "9411:9411"12 networks:13 - zipkin-network1415networks:16 zipkin-network:17 driver: bridge18EOF1920# 2. Create the .env file21cat > .env << 'EOF'22STORAGE_TYPE=mem23EOF2425# 3. Start the services26docker compose up -d2728# 4. View logs29docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/zipkin/run | bashTroubleshooting
- Zipkin UI shows no traces: Verify applications are sending spans to http://zipkin:9411/api/v2/spans and check instrumentation configuration
- Container exits with memory errors: Increase Docker memory limits or switch to external storage backend like Elasticsearch
- Traces appear incomplete or missing spans: Check B3 header propagation in HTTP clients and ensure all services forward tracing headers
- High memory usage with in-memory storage: Configure ZIPKIN_STORAGE_MEM_MAX_SPANS environment variable or implement trace sampling
- Cannot access web interface: Verify port 9411 mapping and check firewall rules blocking access to Zipkin container
- Slow trace queries in web UI: Reduce trace retention time or migrate to persistent storage backend for better query performance
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
zipkin
Tags
#zipkin#tracing#distributed#latency#microservices
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download