Design a Time-Bucketed Log Indexer With Distributed Search
Last updated: November 29, 2026
Quick Overview
Design the storage and query layer for a log analytics platform that ingests several petabytes of semi-structured machine data per day, keeps it searchable by time range and keyword for 90 days, and answers ad hoc search and aggregation queries across a cluster of indexers in seconds.
Splunk
November 29, 20260
0
0 solved
Design the storage and query layer for a log analytics platform that ingests several petabytes of semi-structured machine data per day, keeps it searchable by time range and keyword for 90 days, and answers ad hoc search and aggregation queries across a cluster of indexers in seconds.
This sits close to the core of a machine-data platform: forwarders feed indexers that write time-partitioned buckets, and a search tier fans queries out and merges partial results. The interviewer looks for a realistic on-disk layout (time buckets, inverted index, bloom filters), a clear replication story, and how hot, warm and cold tiers interact with object storage.
What the Interviewer Expects
- Partition data by time into immutable buckets and explain why time is the primary pruning dimension
- Describe a per-bucket inverted index plus bloom filter for keyword search with schema-on-read field extraction
- Explain replication of raw data versus searchable index copies and how a node loss is recovered
- Design distributed search as scatter and gather with partial aggregation on indexers
- Cover tiering hot, warm and cold data to object storage with a local cache
- Address multi-tenant isolation, quotas and noisy-neighbor queries
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle events that arrive hours late with old timestamps?
- What changes if most queries are aggregations over a few extracted fields rather than keyword search?
- How would you rebalance buckets when you add twenty indexers to a cluster?
- How do you stop one tenant's runaway search from starving everyone else?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: ingest raw text and JSON events with a timestamp, host, source and sourcetype; search by time range plus keywords and field filters; run aggregations (count by host, percentiles, timecha...
High-Level Design
Agents on hosts forward events to a load-balanced ingest tier with a durable queue (Kafka-like) for backpressure. Indexers consume partitions, parse timestamps and line breaks, and write to a **hot bu...