The Elasticsearch cluster for logs goes red every Monday after the weekend batch jobs. How do you stabilise it?

AdvancedScenarioLogging Pipelines
Answer

Situation read → Likely too many small shards, unbalanced hot nodes, or disk watermarks being hit during a burst.

What I'd do →

  1. Check GET _cluster/health, GET _cat/shards?v&s=store, and GET _cluster/allocation/explain for unassigned shards.
  2. Look at disk: the default cluster.routing.allocation.disk.watermark.high is 90%; flood stage at 95% makes indices read-only.
  3. Use ILM with rollover by size (max_primary_shard_size: 50gb) instead of daily indices for tiny services.
  4. Move to hot/warm/cold tiers with node attributes, and force-merge then shrink warm indices.
  5. Put a buffer (Kafka) in front so ingest spikes do not hit ES directly.

Why → Shard count and disk headroom drive most ES instability. Thousands of 1 GB shards waste heap.

Interview tip → Quote a target: keep shards in the 10–50 GB range and under ~20 shards per GB of heap.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines