Centralized log aggregation

DesignHard40 min

Your task

Design a centralized log aggregation system ingesting 2TB/day of application logs (peak 60MB/s) from 10,000 containers, with structured JSON and free-text lines mixed. Most queries are 'tail the last 15 minutes for service X' or 'grep this error string across service Y for the last 24h'; a minority are 30-day forensic searches. Cost matters more than millisecond query latency. Design ingest, storage, indexing, and how you make 30-day grep affordable.

It covers

  • Indexing
  • Retention
  • Object storage