⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All FinOps & System Design Interview Questions Scenario 84 of 98 in FinOps & System Design
Staff SRE / Distributed Systems Architect System Design Search Infrastructure & Data Lifecycle SRE System Design

Q: Your enterprise Elasticsearch cluster ingests 15 TB of security logs and application search data daily, totaling 2 Petabytes over 180 days. The cluster crashes with out-of-memory errors, shard allocation storms, and cloud disk storage bills exceeding $120,000/month. How do you re-architect the cluster using Index Lifecycle Management (ILM), Hot-Warm-Cold-Frozen tiering, and Searchable Snapshots to restore stability and reduce costs by over 70%?

Engineering a cost-optimized, resilient 2-Petabyte Elasticsearch / OpenSearch cluster using Index Lifecycle Management (ILM) Hot-Warm-Cold-Frozen tiers and Searchable Snapshots to slash hardware costs by 75%.

#System Design #Elasticsearch #OpenSearch #ILM #Tiered Storage #Search #Big Data
🎙️ Candidate Opening & Architectural Context
"Treating all data equally in Elasticsearch is a recipe for bankruptcy. 95% of search queries target data less than 7 days old, yet historical data occupies 95% of expensive SSD storage. We re-architected the cluster using Elasticsearch Index Lifecycle Management (ILM) and Searchable Snapshots."
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? The Linux Foundation's FinOps Certified Practitioner (FOCP) Program covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Optimize Hot Ingestion Tier with NVMe SSDs & Write Buffers

Maximize write indexing throughput for active incoming data:

  • Hot Node Hardware: Dedicated Hot nodes configured with high-speed local NVMe SSDs, 64 GB RAM (31 GB JVM heap to preserve 32-bit compressed OOPs), and 32 vCPUs.
  • Indexing Optimizations: Set index.refresh_interval: 30s and index.translog.durability: async, slashing disk I/O and increasing indexing throughput by 40%.
  • Data Stream Retention: Data remains in the Hot tier for 3 days to serve active incident investigations.
Pro Tip: Keeping the JVM heap at 31 GB ensures compressed object pointers (Compressed Oops) remain active, doubling effective RAM utilization.
2️⃣

Transition Aging Indices to Warm & Cold Tiers with Force-Merge

Consolidate shards and move data to cost-efficient compute instances:

  • Warm Tier (Day 4 to 14): Relocates indices to Warm nodes backed by cheaper attached block storage. Executes _forcemerge?max_num_segments=1 to merge Lucene segments, purging deleted documents and freeing up memory.
  • Cold Tier (Day 15 to 30): Replicas are dropped (saving 50% storage); resiliency is provided by automated snapshot repositories instead of live replica nodes.
Pro Tip: Force-merging indices down to a single segment dramatically reduces JVM heap memory overhead on aging shards.
3️⃣

Implement Frozen Tier with Searchable Snapshots on Cloud Object Storage (S3)

Retain historical data directly on S3 while maintaining full searchability:

  • Searchable Snapshots: Mounts indices directly from AWS S3 / Google Cloud Storage without allocating dedicated EBS disk storage.
  • Frozen Node Cache: Frozen nodes maintain only small local SSD caches for frequently accessed index metadata and recent search results.
  • Cost Reduction: Storing 1.5 PB of data directly in S3 Standard / Infrequent Access cuts storage expenses by 85% compared to provisioned SSDs.
Pro Tip: Searchable snapshots decouple cluster storage capacity from node disk space, allowing searches across years of data at S3 pricing.
4️⃣

Enforce Shard Sizing Governance & Automated Deletion Policies

Eliminate the excessive shard count crisis across the cluster:

  • Target Shard Size: Enforced rollover policies: max_primary_shard_size: 50gb and max_age: 1d, reducing total cluster shard count from 45,000 shards to 2,800 well-sized shards.
  • Delete Phase: ILM automatically purges indices older than 180 days, reclaiming storage deterministically.
  • Financial Impact: Monthly infrastructure spend dropped from $124,000/month to $29,500/month while eliminating cluster OOM crashes entirely.
Pro Tip: Maintaining shard sizes between 30 GB and 50 GB prevents shard proliferation and cluster state serialization latency.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Petabyte-scale Elasticsearch stability requires ILM tiered storage: high-speed NVMe Hot nodes for 3 days, force-merged Warm nodes, and Frozen Searchable Snapshots backed by S3 object storage for long-term retention."
⚡ 60-Second Elevator Pitch Talking Points
  • Ingest data into NVMe Hot nodes with 30s refresh intervals and 31 GB JVM compressed OOPs.
  • Move aging data to Warm nodes and execute force-merge to 1 segment to shrink memory overhead.
  • Mount Cold/Frozen data directly from S3 using Searchable Snapshots to slash storage costs by 85%.
  • Enforce 50 GB target shard rollover policies to eliminate excessive shard counts and cluster state freezes.
Advertisement
Want more FinOps & System Design scenarios?
Explore our complete collection of scenario-based FinOps & System Design interview runbooks.
Browse All FinOps & System Design Questions →