Asked in: Akamai, Olyv

Centralized Distributed Logging System

1. Requirements

Functional Requirements

  1. Centralized log collection
  2. Log querying and filtering
  3. Near real-time log availability
  4. Log retention and archival

Non-Functional Requirements

  1. High throughput
  2. Fault tolerance / no single point of failure
  3. Service isolation
  4. Durability
  5. Backpressure handling
  6. Horizontal scalability

2. Architecture

The basic architecture is:

                         SERVICE S1
                 ┌─────────────────────┐
                 │ Pod 1                │
                 │ ┌───────┐ ┌───────┐ │
                 │ │  App  │ │Sidecar│ │
                 │ │       │→│Logger │ │
                 │ └───────┘ └───┬───┘ │
                 └────────────────┼─────┘
                                  │
                 ┌────────────────┼─────┐
                 │ Pod 2           │     │
                 │ App → Sidecar ──┘     │
                 └───────────────────────┘
                                  │
                                  ▼
                         ┌────────────────┐
                         │ Kafka S1 Topic │
                         │ P0 P1 P2 ...Pn │
                         └───────┬────────┘
                                 │
                           Consumer Group
                         ┌───────┴────────┐
                         │ C1 C2 C3 ... Cn│
                         └───────┬────────┘
                                 │
                                 ▼
                         ┌─────────────────┐
                         │ Centralized Log │
                         │     Storage     │
                         └────────┬────────┘
                                  │
                                  ▼
                            Query / Search