Observability and Monitoring Architecture Questions
Building visibility into infrastructure and services: metrics, logs, and traces, dashboards and alerting, SLIs/SLOs, and the design of an observability stack. Covers instrumenting systems for actionable signal, reducing alert noise, and diagnosing production issues from telemetry. Infrastructure-wide observability, distinct from network-specific monitoring.
You're told storage costs $X per terabyte per month, and asked to propose a tiered storage policy for logs and metrics under that budget: hot, warm, and cold tiers, retention windows, a downsampling strategy for older data, and archival to cheaper storage. How would you make sure compliance requirements and alerting still work once raw data has been moved or downsampled?
Sample Answer
Direct answer
Split retention into hot (raw, fast storage, days), warm (compressed, still full resolution, weeks), cold (downsampled and heavily sampled, up to a year), and archive (compliance-only raw extracts, years, cheapest storage). Alerting stays correct because every alert either reads from the hot/warm tiers where it needs full resolution, or is redesigned to work on the statistical properties (percentiles, error counts) that downsampling preserves. Compliance stays correct because the raw bytes a regulator might ask for are pulled into a separate, signed archive path that bypasses the operational downsampling entirely.
Tiering policy
| Tier | Window | What's kept | Why |
|---|---|---|---|
| Hot | 0-7 days | Full-resolution raw metrics and logs | Real-time debugging, alert evaluation needs exact values |
| Warm | 8-30 days | Full resolution, compressed ~3x | Recent-incident lookback, still-fresh alerting context |
| Cold | 31-365 days | Metrics downsampled 10:1, logs sampled to 1% (errors kept at 100%) | Trend/capacity analysis, cheap enough to keep a year |
| Archive | 365+ days | Compressed 4:1 extract of the compliance-flagged subset only | Regulatory/legal retention, rarely queried |
Downsampling rule for metrics: never discard raw points, only aggregate. Roll up 10s scrapes into 1-minute buckets storing count, sum, min, max, and pre-computed percentile buckets (histogram, not just an average), so alerting on p95/p99 still works post-downsample. Averaging away the histogram is the single most common mistake here: an average of averages silently breaks p99-based alerts.
Downsampling rule for logs: keep 100% of error/warn-level events forever within the cold window; sample info/debug logs at a low, deterministic rate (hash on trace ID) so a given request's logs are either fully kept or fully dropped, never split. That preserves the ability to reconstruct a whole request's log trail if it was selected.
Keeping alerting correct across tiers
- Alert rules that fire on absolute thresholds (error count, latency p99) are pinned to run against hot/warm data only, since that is where fidelity is guaranteed.
- Longer-window alerts (weekly seasonality, slow burn SLO budget) run against cold-tier rollups, but only because the rollup step preserved histograms rather than plain averages, so the alert's percentile math still holds.
- Backtest every downsampling change: replay the last 90 days of raw data through the proposed rollup and confirm the alert would have fired at the same times it fired against raw data, before shipping the rollup config.
Keeping compliance correct across tiers
- Compliance retention is a separate write path, not a side effect of the operational tiers. At ingest, a policy tags records matching compliance scope (PII, regulated data classes, specific tenants); those records get a signed, immutable copy written to the archive tier at full fidelity, independent of what the operational hot/warm/cold pipeline does to the rest of the stream.
- The operational tiers are free to downsample or expire on their own schedule because the compliance obligation is already satisfied by the separate archive copy.
- Archive retrieval is on-demand (async restore), so day-to-day cost stays low, but an auditor's request for raw data from 3 years ago is answerable.
Worked example
Assume a service ingests G=500 GB/day of combined logs and metrics, split 30% metrics / 70% logs, and the storage budget is a hot-tier unit price of X=$23/TB-month (a concrete stand-in for the given $X). Illustrative relative unit prices for the other tiers, typical of SSD-backed vs. compressed-object vs. archival storage:
Warm priceCold priceArchive price=0.40X=$9.20/TB-month=0.15X=$3.45/TB-month=0.02X=$0.46/TB-monthTier volumes (hot: 7 days raw; warm: next 23 days at 3:1 compression; cold: next 335 days, metrics down 10:1 and logs sampled to 1%; archive: a 2%-of-ingest compliance subset, retained 7 years = 2555 days, compressed 4:1):
VhotVwarmVcoldVarchive=500×7=3,500 GB=3.50 TB=3500×23=3,833.33 GB=3.83 TB=10150×335+350×335×0.01=5,025+1,172.5=6,197.5 GB=6.20 TB=4500×0.02×2555=425,550=6,387.5 GB=6.39 TBMonthly cost:
C=3.50(23)+3.83(9.20)+6.20(3.45)+6.39(0.46)=80.50+35.27+21.38+2.94=$140.09/monthCompare that to the naive policy of keeping everything raw, at hot-tier price, for the full 7-year compliance window:
Cnaive=500×2555×100023=$29,382.50/month Reduction=1−29,382.50140.09=99.5%Tiering plus targeted downsampling cuts the steady-state storage bill by roughly 99.5% relative to keeping everything at hot-tier fidelity for the retention window, while still satisfying a 7-year compliance obligation and keeping alerting on full-fidelity data for the first month.
flowchart LR
Ingest[Raw Ingest] --> Hot[Hot 0-7d full res]
Hot --> Warm[Warm 8-30d compressed 3x]
Warm --> Cold[Cold 31-365d downsampled 10x, logs 1%]
Cold --> Archive[Archive 365d+ compliance subset, 4x compressed]
Hot --> AlertEval[Alert Evaluation]
Warm --> AlertEval
Cold --> AlertEval
Archive --> Restore[On-demand Restore]
Restore --> AlertEval
Ingest --> Vault[Signed Compliance Vault]
Vault --> Archive
Trade-offs and pitfalls
- Downsampling metrics to plain averages instead of histograms is the classic mistake: it looks fine until a p99-based SLO alert goes silent because the percentile can no longer be reconstructed from the rollup.
- Deterministic (hash-based) log sampling beats random sampling because it keeps a request's full log trail together instead of showing half a trace.
- Treating compliance retention as "whatever the operational tiers happen to still have" instead of a separate write path is a common design flaw: an operational cost-cutting change (shortening the cold window) can silently create a compliance gap unless the archive copy is decoupled from it.
- Archive restore latency (minutes to hours, depending on backend) is a real trade-off against cost; if legal holds require faster turnaround, that changes the archive tier choice and its price multiplier.
- Budget monitoring has to be proactive: alert on forecasted spend crossing the budget before the bill arrives, not after, since tier transitions are usually async and lag actual ingest growth.
Design the mechanics of tail-based sampling at real scale, say 100,000 traces per second: spans have to be buffered somewhere until the sampling decision can be made, slow or erroneous traces need their full span set captured, and everything else gets thinned. How do you coordinate that buffering and decision-making across many collector instances without unbounded memory growth?
Sample Answer
The key mechanic is consistent-hash routing by trace_id at the load balancer, so every span belonging to a given trace lands on the same collector instance and no cross-collector coordination is needed to assemble a trace before deciding whether to keep it. Memory is then bounded with a fixed decision window plus per-shard and per-trace caps, not by trying to hold every trace indefinitely.
Coordination architecture
flowchart LR
A[Application Spans] --> B[Load Balancer: hash by trace_id]
B --> C[Collector Shard 1: buffer]
B --> D[Collector Shard 2: buffer]
B --> E[Collector Shard N: buffer]
C --> F[Sampling Decision Engine]
D --> F
E --> F
F -->|keep| G[Export Full Trace]
F -->|drop| H[Discard]
F -->|timeout| I[Partial-Trace Fallback]
Because routing is consistent-hash on trace_id, adding or removing collectors only reshuffles a small fraction of trace-to-collector assignments (standard consistent-hashing property), so scaling the fleet doesn't require a coordinated rebalance of in-flight traces.
Sizing the buffer
Take the stated 100,000 traces/sec, an average of 20 spans/trace (a typical microservice call depth), an average compressed span size of 500 bytes (a labeled assumption), and a 10-second decision window (wait up to 10 seconds after a trace's apparent last span before deciding, which covers the large majority of trace completion times):
traces_per_sec = 100_000
avg_spans_per_trace = 20
avg_span_bytes = 500
decision_window_s = 10
num_collectors = 50
span_rate = traces_per_sec * avg_spans_per_trace # 2,000,000 spans/sec
spans_buffered_systemwide = span_rate * decision_window_s # 20,000,000 spans
bytes_buffered_systemwide = spans_buffered_systemwide * avg_span_bytes # 10 GB
spans_per_collector = spans_buffered_systemwide / num_collectors # 400,000 spans
bytes_per_collector = spans_per_collector * avg_span_bytes # 200 MB
At 50 collectors, each instance buffers about 400,000 spans (200 MB), a footprint that fits comfortably in a modest container (2-4 GB), while the system-wide live buffer is about 10 GB spread across the fleet. This is the concrete argument for sharding by trace_id: a single collector holding the full 10 GB buffer would need a memory profile most container platforms would flag as oversized, while 50 shards each holding 200 MB is unremarkable.
Bounding memory beyond the happy path
The 10-second window handles typical traces, but slow or stuck traces need explicit handling so they don't grow the buffer without bound:
- Per-trace TTL: destroy a trace's buffer if no new span arrives within some multiple of the decision window (e.g., 2x), forcing a decision (keep as partial, or drop) rather than waiting indefinitely.
- Per-shard memory cap with eviction: each collector enforces a hard memory ceiling; if exceeded, evict the lowest-priority buffered traces first (e.g., traces with no error/latency signal yet) rather than failing open.
- Global admission control: a lightweight control-plane process aggregates each collector's buffer occupancy and kept-rate on a slow control loop (seconds, not per-request) and adjusts the decision window or sampling probability fleet-wide if the system is trending toward the memory ceiling, rather than each collector reacting in isolation and potentially over-correcting.
Decision logic
- Cheap deterministic rules first (status code indicates an error, latency exceeds a fixed threshold): mark "must keep" immediately without waiting for the full window, since these are unambiguous.
- For everything else, wait out the decision window, then apply either a lightweight scoring model (feature-based, comparing this trace's shape against a recent rolling baseline) or a straightforward probabilistic sample at a rate tuned to the fleet-wide keep-rate budget.
- On TTL expiry before a full decision, export whatever spans were captured as a partial trace rather than silently dropping everything; a partial error trace is still more useful for incident response than nothing.
Trade-offs and pitfalls
- The most common design mistake is trying to coordinate the sampling decision across collectors (e.g., a central service that all collectors ask before deciding); at 2,000,000 spans/sec that coordination service becomes the bottleneck. Consistent-hash-by-
trace_idavoids this entirely by guaranteeing the decision can be made locally. - A fixed decision window is a trade-off, not a free parameter: too short and slow-but-successful traces (a legitimately slow but non-erroring downstream call) get truncated into partial traces; too long and the buffer grows for no benefit on traces that were always going to be dropped.
- Eviction policy under memory pressure needs to bias toward keeping traces that already show error/latency signal; a naive LRU eviction can evict exactly the traces you most want to keep just because they arrived earlier.
- Rebalancing collector count changes which shard owns which traces going forward, but in-flight traces already buffered on their original shard need to either finish there or be explicitly drained; a hash-ring change that silently orphans in-flight buffers loses those traces' decisions.
You need to deploy an OpenTelemetry Collector fleet that can autoscale with load and keep accepting data even if the downstream backend has an outage. How would you design the deployment (agent versus gateway, horizontal autoscaling, a durable buffer sitting in front of the exporters) and structure the processor chain, for example batching, sampling, and enrichment?
Sample Answer
Direct Answer
Split the fleet into a fixed agent tier (one per host, DaemonSet-deployed, doing only light initial processing) and a horizontally autoscaled gateway tier that does the heavier work (sampling, enrichment, batching) and fronts the actual export. Put a durable buffer between the gateway and the exporter so a backend outage fills the buffer instead of blocking or dropping at the gateway, and scale the gateway tier on real backpressure signals (queue depth, CPU) rather than a fixed replica count.
Structured Elaboration
Fleet topology
flowchart LR
AGENT["Per-Host Agents"] --> GW["Gateway Tier: HPA-scaled"]
GW --> PROC["Processor Chain: memory_limiter, enrich, sample, batch"]
PROC --> BUF[("Durable Buffer")]
BUF --> EXP["Exporter"]
EXP --> BACKEND[("Backend")]
BUF -.->|"queue depth metric"| HPA{"Autoscaler"}
HPA -.->|"scale replicas"| GW
Agent versus gateway split
Agents run one per host, receiving OTLP from local processes and forwarding onward with minimal processing, so their resource footprint per host stays flat and predictable regardless of fleet-wide load. The gateway tier does the load-dependent work (see below), which is exactly what needs to scale with traffic, so isolating it from the fixed agent tier is what makes autoscaling meaningful.
Horizontal autoscaling
Scale the gateway tier on a metric that reflects real backpressure, most reliably queue depth in front of the exporter (or CPU as a proxy if queue depth isn't exposed as a scalable metric), using a standard proportional scaling rule: desired replica count scales with how far the current metric is above target.
Durable buffer in front of the exporters
A persistent queue (backed by local disk or an external durable log like Kafka) sits between the processor chain and the exporter. During a backend outage, the gateway keeps accepting and processing data, writing into the buffer instead of failing the export, and drains the buffer once the backend recovers.
Processor chain structure
Order matters: memory_limiter first (shed load before spending CPU on anything else), then resource and attribute enrichment, then sampling (tail-based sampling needs to see whole traces, so it runs before batching, not after), then batch last, right before the exporter, so batches only ever contain data that already survived the sampling decision.
Worked Example
Autoscaling thresholds. Assume each gateway pod sustains 20,000 spans/sec (a stated sizing assumption reflecting the processor chain's per-pod cost), and incoming load ranges from a floor of 50,000 spans/sec to a peak of 400,000 spans/sec through the day.
minReplicas=⌈20,00050,000⌉=3,maxReplicas=⌈20,000400,000⌉=20Applying the standard horizontal-scaling proportional rule, desiredReplicas = ceil(currentReplicas x currentMetricValue / desiredMetricValue), for a concrete example at 5 current replicas running at 90% CPU against a 70% target:
desiredReplicas=⌈5×7090⌉=⌈6.43⌉=7Durable buffer sizing. Assume the gateway continues accepting spans at 100,000/sec during a backend outage (average 800 bytes/span post-enrichment, a stated design input), and the outage is expected to last up to 15 minutes (900 s) before either recovery or a paging escalation forces a decision:
100,000×900×800 B=7.2×1010 B=72 GBA roughly 72 GB buffer requirement is well within the local disk capacity of a typical commodity broker or persistent-volume-backed queue, so this is a provisioning number to size the buffer's storage class against, not a hard architectural constraint.
Trade-offs and Pitfalls
Scaling on CPU alone is a lagging proxy: CPU can look fine even while the queue in front of the exporter is growing, if the bottleneck is actually export throughput to a slow backend rather than processing throughput. Scaling on queue depth directly is a better signal when it's available, since it reflects the thing you actually care about (are we falling behind) rather than a correlated but imperfect stand-in.
A durable buffer removes the immediate pressure to fix an outage fast, which is good for availability but can mask a slow backend degradation if nobody is watching buffer fill rate: a buffer that's growing steadily but not yet full looks the same as a healthy system on a dashboard that only shows "buffer not full yet," unless fill rate itself is alerted on.
Running sampling before batching (rather than after) is correct for tail-based decisions that need whole traces, but it means the sampling stage has to hold and correlate spans across a trace, which is real memory pressure on the gateway tier specifically, on top of whatever the autoscaling math above accounts for from raw throughput alone. Size gateway pod memory against expected in-flight trace count, not just span throughput.
Design a cross-signal correlation index that lets an engineer jump quickly from a metric anomaly to the relevant logs and traces for root-cause analysis. What identifiers would you require every signal to carry, how would you build and maintain that mapping, and how would you keep queries across systems fast at scale, including when an identifier is missing?
Sample Answer
Direct answer
Require every signal (metric, log line, trace span) to carry a small set of common identifiers, most importantly trace_id (or a request/correlation ID where full tracing isn't wired up yet), plus service_name and a timestamp. Build a lightweight mapping index, keyed by those identifiers, that points to where each related log or span physically lives (shard, offset, time range) rather than storing the events themselves twice. When an identifier is missing, fall back to narrowing by time window and service first, then use a scored, probabilistic match on top of that narrowed candidate set instead of searching the whole corpus.
Structured elaboration
Required identifiers per event:
trace_id/span_id: the strong identifier, present when full distributed tracing is instrumented.service_name,host_or_pod_id: contextual keys usable even when tracing isn't present.event_timestamp: needed for the time-window fallback and for ordering.metric_dimensions/anomaly_id: on the metrics side, the anomaly detector emits an anomaly document carrying whatever identifiers were present on the underlying series.
Index structure, not a duplicate copy: the mapping store is a pointer index (topic/partition/offset for logs, trace/span ID for traces), not a second copy of log or trace bodies. Logs and traces stay in their existing systems (search index, trace store); the correlation index only tells the query which shard and offset to fetch.
Query flow:
- Direct ID lookup, if the anomaly carries a
trace_id: O(1) pointer lookup into the mapping store. - Indexed search, if not: query the log/trace index filtered by
service_nameand a time window around the anomaly. - Probabilistic fallback, if identifiers are sparse: score candidates from step 2 by temporal proximity, shared host, and payload fingerprint, and return ranked results with a visible confidence, not a silent best guess.
flowchart LR
A[Metric anomaly] --> ID{trace_id present?}
ID -- yes --> M[(Mapping index: id -> pointer)]
M --> L1[Fetch log/trace by pointer]
ID -- no --> TW[Filter: service + time window]
TW --> SC[Score candidates: proximity, host, fingerprint]
SC --> L2[Ranked candidates + confidence]
Maintaining the mapping: on ingest, if a strong identifier is present, upsert a bounded (capped) pointer list into the mapping store for that ID and set a TTL matching the signal's own retention. A background job prunes expired entries so the index doesn't grow unbounded past what the underlying logs and traces themselves retain.
Worked example
Index sizing. Assume the cluster produces 50,000 events/sec across logs and trace spans combined:
eventsPerDay=50,000×86,400=4.32×109Each mapping entry (topic, partition, offset, timestamp, service ID) is about 40 bytes:
indexBytesPerDay=4.32×109×40 bytes=172.8 GB/dayAt a 7-day retention window matching typical hot log retention:
indexBytesRetention=172.8×7=1,209.6 GB≈1.21 TBThis is the number that justifies capped pointer lists and TTL-based pruning in the design above: an unbounded, uncapped index at this event rate would grow past a terabyte inside a week even though it stores no event bodies, only pointers.
Fallback candidate-set size when the identifier is missing. With 200 services sharing the 4.32×109 daily events roughly evenly:
eventsPerServicePerDay=2004.32×109=21,600,000Narrowing to a ±2.5s window (5s total) around the anomaly timestamp before service-level scoring:
timeReductionFactor=586,400=17,280 candidateSetSize=17,28021,600,000=1,250 eventsFiltering by service and a 5-second window before running any fuzzy scoring shrinks the search space from 21.6 million events/day for that service down to about 1,250 candidates, small enough for a scoring pass to run against on every anomaly without scanning the full day's log volume.
Trade-offs & pitfalls
| Fallback stage | Precision | Cost | When it's needed |
|---|---|---|---|
| Direct ID lookup | Exact | O(1) | trace_id present (the common case in fully-instrumented services) |
| Service + time window | Approximate, but bounded | O(candidates), here ~1,250 | trace_id missing, service known |
| Fuzzy scoring | Ranked, with confidence | O(candidates) scoring passes | trace_id missing and multiple plausible matches remain |
Common wrong turns: treating the mapping index as a full copy of the underlying signals instead of a pointer index (this doubles storage for no correlation benefit and creates a second source of truth to keep consistent); running the fuzzy-scoring pass over the entire day's events instead of narrowing by service and time window first, which turns an O(1,250) scoring problem into an O(21,600,000) one for no accuracy gain; and silently returning the single top-scored fuzzy match without surfacing its confidence, which looks like a correlation but is actually a guess an on-call engineer has no way to sanity-check.
Design the storage schema and partitioning strategy for a time-series database that has to handle high-cardinality metrics while still supporting efficient downsampling and range queries. Cover the data model (metric name, labels, timestamp, value), how you'd choose partition keys, your chunking strategy, compression, and index structures, and what that trades off in query latency versus storage overhead.
Sample Answer
The core design decision is a two-level key: shard by a hash of the series identity so writes and label lookups distribute evenly, and chunk by time within each series so both compression and range queries stay efficient. Everything else (indexing, downsampling, compression) hangs off that.
Data model
Each sample is (metric_name, labels, timestamp, value). In practice you don't store metric_name and labels as free strings per sample; you compute a SeriesID once per unique combination:
and every sample after that is just (SeriesID, timestamp, value). The label set is stored once in a separate series-metadata record, not repeated per sample.
Partitioning and chunking
flowchart LR
A[Sample Ingest] --> B[Hash by SeriesID]
B --> C[Shard 1]
B --> D[Shard 2]
B --> E[Shard N]
C --> F[Head Block: in-memory chunk]
F --> G[Flush to Durable Chunk]
G --> H[Inverted Label Index]
G --> I[Block Storage]
H --> J[Query: label lookup]
I --> J
- Partition key:
(time_window, shard_id)whereshard_id = hash(SeriesID) mod N. Time-first partitioning means old partitions become immutable and can be compacted/downsampled/expired independently; sharding by SeriesID hash inside each time window spreads a hot series's neighbors across nodes instead of colocating them. - Chunking: each series appends to an in-memory "head" chunk, flushed to a durable, compressed chunk when it hits either a time bound (e.g., 2 hours) or a size bound. Chunk metadata (SeriesID, start/end timestamp, min/max value) lets a query prune whole chunks without decompressing them.
- Compression: delta-of-delta for timestamps, XOR (Gorilla-style) for values within a chunk, general-purpose compression (LZ4/Snappy) over the chunk byte stream, dictionary-encoded label strings referenced by ID.
- Index structures: a primary LSM-style index maps
SeriesID -> chunk pointersfor fast range scans of one series; a secondary inverted index mapslabel_key=value -> [SeriesIDs], typically stored as compressed bitmaps (e.g., Roaring bitmaps) so a query like{job="checkout", env="prod"}becomes a bitmap intersection instead of a full scan.
Sizing the design against a concrete workload
Take 10,000,000 active series, an average of 6 label pairs per series (beyond the metric name), a 2-hour flush window at 15-second scrape interval, and a target of at most 2,000,000 active series per shard for balanced load:
active_series = 10_000_000
avg_labels_per_series = 6
bytes_per_posting_entry = 3 # Roaring-bitmap-compressed 32-bit series ID, moderately dense postings (assumption)
total_postings_entries = active_series * avg_labels_per_series
inverted_index_bytes = total_postings_entries * bytes_per_posting_entry
chunk_window_s = 2 * 3600
scrape_interval_s = 15
samples_per_series_per_chunk = chunk_window_s / scrape_interval_s
compressed_bytes_per_sample = 2 # consistent with the Gorilla-style bit math above, rounded up for a mixed workload (assumption)
head_bytes_per_series = samples_per_series_per_chunk * compressed_bytes_per_sample
head_total_bytes = active_series * head_bytes_per_series
target_series_per_shard = 2_000_000
min_shards = active_series / target_series_per_shard
Result: total_postings_entries = 60,000,000, inverted_index_bytes ≈ 180 MB, samples_per_series_per_chunk = 480, head_bytes_per_series = 960, head_total_bytes ≈ 9.6 GB, min_shards = 5.0 (round up to 8 for power-of-2 hash routing headroom).
That tells you two concrete things: the in-memory working set for the head block across all shards (~9.6 GB) comfortably fits on modern hardware split across 8 shards (about 1.2 GB/shard), and the inverted index itself (~180 MB) is small relative to the chunk data, meaning label-lookup cost is dominated by bitmap intersection speed, not index size. If active series grew 10x to 100M, head memory would grow to ~96 GB total, which is the point where you'd need to either shrink the chunk window (trading write amplification for lower per-shard memory) or add more shards.
Trade-offs
| Choice | What you gain | What it costs |
|---|---|---|
| Smaller chunk window (e.g., 30 min instead of 2h) | Lower head-block memory footprint, faster recovery on restart | More, smaller chunks on disk; more flush/compaction overhead; slightly worse compression ratio since fewer samples per block |
| More shards | Better write/query parallelism, smaller failure blast radius per shard | Cross-shard queries for a single label predicate now fan out to more nodes; more metadata to track |
| Time-first vs. hash-first partition key ordering | Time-first makes retention/expiry a cheap drop-partition operation | Hash-first can improve single-series read locality but makes retention expensive (has to scan and delete rather than drop) |
| Roaring-bitmap inverted index | Fast label-predicate intersection at low memory cost | Degrades if label values are extremely high-cardinality and postings lists become sparse and non-contiguous, hurting bitmap compression |
Pitfalls
- Choosing a partition key that's purely hash-based (no time component) makes retention expensive: you can't just drop a partition, you have to scan and delete, which is the mistake most designs make when they optimize only for write balance and forget that data has to expire.
- Sizing the head-block window without doing the arithmetic above (as many designs do) leads to either restart storms (window too large, recovery replays too much) or excessive flush overhead (window too small).
- An inverted index without a query-time cardinality guard turns a single broad label predicate (like an unbounded regex) into a full index scan across all shards; that needs a query-side cost limit independent of the storage design.
Unlock Full Question Bank
Get access to all 40 Observability and Monitoring Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.