Limited-time offer: 80% off every plan

See plans

Log Aggregation Platform System Design Interview: A Rehearsal Script

A spoken-style walkthrough of the log aggregation platform system design interview, focused on scoping, the write path, and naming trade-offs out loud.

By Emily Miller14 min read

The log aggregation platform system design interview trips up strong engineers for a specific reason: the prompt is write-heavy, and much of what candidates rehearse is read-heavy. In a read-heavy prompt such as a URL shortener, you optimise reads. Here you optimise an append-only firehose, and the trade-offs run the other way: batching over latency, retention over richness, backpressure over perfect durability. This is a rehearsal script, not a memorised answer. Adapt the assumptions, keep the reasoning.

Why This Log Aggregation Platform System Design Interview Prompt Is Different

Three reasoning moves carry this prompt, and the interviewer listens for each one:

  • Scoping the write volume. You convert vague talk of "a lot of logs" into events per second, event size and daily ingest, then say what those numbers force.
  • Choosing a write path. You commit to push or pull, batching, a buffer and a backpressure policy, and you say why each choice fits the volume you scoped.
  • Defending trade-offs. For every decision you name the alternative, the reason and the condition that would flip it.

If you have already worked through a read-heavy prompt, notice how much of that playbook you have to invert here.

Step 1: Clarify Requirements Before You Draw Anything

Ask who produces the logs (services, hosts, containers, edge devices) and who consumes them (on-call engineers, security, product analytics). Those two answers change the whole design: an on-call engineer wants a fast tail of recent errors, a security team wants complete retention and cheap long-range search, and a product analytics team wants to slice by request identifiers over long windows. That last consumer alone can change your retention window and force an extra indexed field, so name each consumer and what they need before you commit to either.

Pin down scale in orders of magnitude, not false precision: events per second, average event size, daily ingest volume, retention window. Then separate functional requirements (ingest, store, search, alert, retain, delete) from non-functional ones (durability, availability, query latency, cost). The non-functional list is where the argument actually lives on this prompt, so practise naming those trade-offs out loud before you attempt the design. If the framing itself is the part you freeze on, the walkthrough on non-functional requirements in a system design interview shows the same habit of naming trade-offs on a different prompt.

Finally, ask what "search" means. Exact match on a field, full-text, or aggregation over time buckets? Each answer changes the design. State your assumptions out loud and write them down; the interviewer can correct you early instead of late. If you want to rehearse the requirements conversation on its own, the walkthrough on functional requirements in a system design interview covers the functional half of the same conversation.

A short opening script you can adapt:

"Before I design, let me check four things. Who produces the logs and roughly how many events per second? Who queries them, and how fresh does a result need to be? What does search mean here, and what is the retention window? I'll assume a high write rate, on the order of hundreds of thousands of events per second at a few hundred bytes each, which puts daily ingest in the terabytes. I'll also assume a retention window of a few months and sub-minute alerting. Adjust if that's off."

Those figures are example assumptions, not benchmarks. Replace them with numbers you can defend, and say the arithmetic out loud so the interviewer can correct you early.

Step 2: Sketch the High-Level Architecture

Keep the first diagram small: producers to a collection tier (agents or a client library), to a durable buffer, to storage, to a query layer, to a UI or alerting consumer. Explain why the buffer exists: it absorbs bursts and decouples slow storage from fast producers. Describe the write path and the read path separately; conflating them is a common source of muddled answers. Add components only when a requirement forces you to, and say which requirement forced each one. A good habit is to narrate the diagram as you draw it, naming the requirement behind each arrow.

Step 3: The Ingestion Path and Backpressure

Compare push versus pull collection and say which you would pick for a fleet of services. Push is simpler to operate across many producers; pull gives the collector control over load. Pick one, give a reason, and name the condition that would change your mind.

Batching and compression at the agent is a trade-off you should work through out loud. Say something like: "I'll batch for up to a second or until a size threshold, and compress each batch, because fewer, larger requests cut overhead on both the agent and the collector. The cost is up to a second of extra latency before a log line is visible, which is fine for search but too slow for alerting, so I'd let critical streams flush sooner." That is a complete thought: choice, reason, condition.

Then talk about backpressure honestly. What happens when storage cannot keep up? You drop, buffer, or shed load, and each choice has an owner who will be unhappy. Name the policy: buffer first, then shed the least important streams, and never silently drop audit logs. Mention partitioning by a key such as service or host so a single hot tenant does not starve the rest, and note that the partition key also decides how evenly the write load spreads.

Step 4: Storage Layout, Indexing and Retention

Explain why append-only, time-partitioned storage suits logs and how it makes retention cheap: you delete a partition instead of rewriting records. Then discuss the index trade-off. Indexing every field makes queries fast and writes expensive; indexing fewer fields flips that. Say which fields you would index and why: for example, index service name, host, severity and timestamp, because those are the fields on-call engineers filter by first, and leave free-text message bodies unindexed or lightly indexed so the write path stays cheap. Then state the condition that would change it: if product analytics needed to slice by a request identifier, you would add that field and accept the extra write cost.

Partitioning strategy deserves a sentence of its own. Time is the natural first dimension, because it matches how people query and how retention works. Within a time window, partition by service or host so a single noisy producer writes to its own partitions instead of crowding everyone else's. The trade-off to name: more partitions spread the write load and shrink each query's scan, but each partition carries overhead, so you pick a granularity that keeps partitions large enough to be efficient and small enough to expire cheaply.

Cover tiering: hot recent data on fast storage, older data on cheaper storage, with a clear retention and deletion policy. Bring up schema-on-write versus schema-on-read and what each costs you in flexibility and query speed. Schema-on-write gives faster queries and stricter structure; schema-on-read keeps ingestion flexible but pushes parsing cost into every query.

Step 5: Query, Alerting and Multi-Tenancy

The query section is where you show that you understand cost, not just features. Describe how a query fans out across partitions and how results are merged and ordered. A concrete example helps: a search for errors from one service over the last hour first prunes to the partitions that overlap that hour, then fans out to the matching partitions in parallel, and finally merges the partial results and sorts by timestamp before returning the top results. Saying the pruning step out loud shows you understand why time partitioning matters for query cost, not just retention.

Query cost is worth estimating out loud too. The work is roughly the number of partitions scanned times the bytes read per partition, so a one-hour search over a few services touches far less data than a month-long full-text scan. That arithmetic is why you cap how far back a single query can scan and why you keep the index narrow: both decisions bound the bytes a query can touch before it starts.

Explain why alerting is a streaming problem rather than a query problem, and where you would evaluate rules: on the stream as events arrive, so an alert fires within seconds rather than waiting for the next scheduled query.

Tenant isolation deserves its own paragraph, because it is where a log aggregation platform architecture earns or loses trust. Noisy neighbours are common: one team's debug logging can multiply overnight and crowd shared capacity. The moves to name are per-tenant quotas on ingest volume and query concurrency, separate partitions or streams per tenant so one team's spike writes to its own space, and a fair-share policy in the query layer so a heavy scan from one team cannot starve another's. Then say what happens when a tenant hits its quota: throttle that tenant, alert its owner, and keep the rest of the platform unaffected. Note where caching helps and where it misleads, especially for recent data that is still arriving.

Step 6: Trade-Offs to Say Out Loud

This is often the section interviewers remember, and it is where preparation pays off most. Phrase each trade-off as choice, reason, condition.

  • Durability versus latency: "I'll acknowledge writes after they land in the buffer rather than after full replication, because losing a few seconds of logs is acceptable here. If this were audit data, I'd replicate synchronously."
  • Consistency versus availability during a partition: "I'll favour availability and accept slightly stale query results, because a log platform that stops accepting writes is worse than one that answers a search a minute late."
  • Cost versus query speed: "I'll index a small set of fields and keep retention at a few months, because index breadth, replication factor and retention length all spend money."
  • Simplicity versus flexibility: "I'll ship a smaller query language, because a smaller feature set is easier to operate and easier to defend under questioning."

That third part is usually what separates a rehearsed answer from a designed one. If naming non-functional trade-offs out loud is the part you freeze on, practise the same habit on a different prompt until the sentences come automatically; the rate limiter system design interview walkthrough is a request-shaped counterpart where the same discipline applies in a different direction.

Step 7: Failure Modes and How You Would Recover

Failure questions are where you show that your design has owners and policies, not just boxes. Walk through four failures in order, and give each one the same shape: what breaks, what you protect, and what would change the policy.

A storage node dies mid-write. Anything not yet acknowledged is lost from that node, but the durable buffer still holds recent batches, so the recovery path is replay: the buffer re-delivers unacknowledged batches to a healthy replica. The condition that changes this is audit-grade data, where you would wait for replication before acknowledging and accept the extra latency.

A query takes down the cluster. The failure here is contention: a heavy scan competes with ingestion for the same capacity. The fix is limits and separation: per-query timeouts, a cap on how far back a single query can scan, and read capacity kept apart from write capacity so a slow query cannot starve the write path. You would loosen the limits only if a trusted team needed a scheduled heavy report.

The buffer fills. Now the choice is explicit: shed the least important streams first, keep audit and security logs longest, and alert the platform team before shedding starts rather than after. The condition that changes it is a compliance requirement that names certain streams as undroppable, which turns shedding into a capacity escalation instead.

A bad deploy floods the pipeline. One producer can multiply its volume in minutes, so you rate-limit per producer and keep a kill switch that stops a single noisy source without touching the rest. You would raise a producer's limit only after its owner explains the new volume.

How to Rehearse This Out Loud

Practise the first two minutes until the requirements questions come automatically. Record yourself and listen for places where you said a technology name instead of a reason. Rehearse the trade-off sentences as complete thoughts: choice, reason, condition.

Here is an example of that rewrite. Weak: "I'd use a queue here because it's more scalable." Stronger:

"I'd put a durable buffer between the agents and storage, because it absorbs bursts and keeps slow storage from blocking fast producers. The cost is a short delay before a log line is searchable, so I'd accept that for most streams but flush critical ones sooner. If the data were audit-grade, I'd trade the latency for synchronous replication instead."

Use a practice tool such as AI Interview assistant only to rehearse and review your own explanations; the design and the honesty of your reasoning stay yours. For more walkthroughs, see our blog.

The takeaway: the interviewer is not checking whether you can name a queue and a search engine. They are checking whether you can scope a write-heavy pipeline, defend each decision out loud, and say what would change your mind. That is the whole skill this log aggregation platform system design interview is testing, and it is the one you can rehearse.

Frequently asked questions

How much detail should I give in a log aggregation platform system design interview?

Enough detail to justify each decision, not enough to build it. Name the component, the reason it exists and the trade-off it encodes, then move on. If the interviewer wants more, they will ask, and you will have time left to answer well.

Should I name specific technologies in my answer?

You can name a technology as shorthand for a pattern, but always attach the reason. "A durable append-only buffer, in the shape of a log like Kafka" is stronger than "Kafka", because it shows you chose a property, not a brand. The interviewer is grading reasoning, not vendor recall.

What numbers should I estimate for log ingestion volume?

Start from a single log line and build up. Estimate its size from the fields it carries, multiply by the events per second you assume, then convert to a daily figure and check it against your retention window and storage cost. If the daily total looks implausible for the system described, say so and adjust the assumption rather than defending it.

How do I handle retention and deletion questions without overcomplicating the design?

Make retention a property of storage layout rather than a background job. Time-partitioned, append-only storage lets you expire or move a whole partition, which keeps deletion cheap and predictable. State the policy, who can change it, and what happens to data that must be kept longer.

What is the most common mistake candidates make on this prompt?

Skipping the write path to talk about search. The symptom an interviewer notices is a candidate who describes dashboards and query syntax while never saying how events arrive, how they are batched, or what happens when storage falls behind. Spend your first minutes on ingestion and backpressure, then let search follow from the storage layout you chose.

How is this prompt different from designing a URL shortener or a rate limiter?

Those prompts are read-heavy or request-shaped, so latency and cache design dominate. Log aggregation is write-heavy and append-only, so batching, buffering, partitioning and retention dominate, and several trade-offs run in the opposite direction. The requirements discipline is the same, but the conclusions differ.

Rehearse your walkthrough out loud, then plan your next session on our blog.