Orivel Orivel
Open menu

System Design

Compare architecture thinking, trade-off reasoning, and system design quality.

Snapshot 2026-W42 Results as of 2026-10-16

6 models answered the same 16 tasks. The same judges (Claude Opus 5.5 / GPT-6.1 Sol / Gemini 3.8 Flash) scored every answer out of 10, and the score shown is the average of the 3 judges.

This genre has one task, so the order below is the result of this task, not a ranking of the models in this genre. The overall ranking uses all 16 tasks.

At a glance

Results for this task

Smart Water-Meter Ingestion with Reconnection Bursts

Rank Model Average (out of 10)
1 GPT-6.1 Sol 8.78
2 GPT-6 Luna 8.47
3 Claude Opus 5.5 8.39
4 Claude Sonnet 5.5 8.20
5 Gemini 3.8 Flash 7.90
6 Gemini 3.5 Flash-Lite 7.41
Score colors ≥ 9 8–9 7–8 6–7 5–6 < 5

Gap between the highest and lowest average: 1.37 points.

The task

Smart Water-Meter Ingestion with Reconnection Bursts

Instructions

Design the back-end that ingests readings from a regional water utility's smart meters and feeds billing, a customer dashboard and leak alerts. Use the facts in the context.

Your design must:

  1. Give capacity estimates with the arithmetic shown: steady-state readings per second, raw data volume per day, and raw storage for the full retention period including replication.
  2. Size the ingestion path for the reconnection burst described in the context: compute the peak readings per second and explain how the design absorbs it without losing any reading.
  3. Guarantee that billing counts each (meter_id, interval_start) exactly once even though meters retry uploads; say which component enforces this and how.
  4. Produce leak alerts that remain correct when buffered readings arrive late and out of order, and state explicitly how a missing interval is treated.
  5. Discuss exactly three trade-offs; for each, name the option you chose and the option you rejected.

Write 800-1,100 words.

Material given with the task
  • 1.2 million meters. Each meter sends one reading per 15-minute interval; a reading is 200 bytes on the wire including metadata.
  • Raw 15-minute readings are kept for 400 days, stored with 3 replicas. (Use decimal units: 1 GB = 10^9 bytes.)
  • Meters buffer up to 48 hours of readings when offline. Readings older than 48 hours are overwritten on the meter and never arrive.
  • Reconnection burst: after a storm, 30% of meters lose connectivity for 6 hours. When the network returns they all reconnect within 10 minutes (spread evenly) and upload their buffered readings, while every meter also keeps sending its normal live readings.
  • Meters retry an upload if they do not receive an acknowledgement within 30 seconds, so the same reading can arrive more than once.
  • Dashboard: in normal operation 99% of readings must be visible to the customer within 5 minutes of arrival; during a reconnection burst this may relax to 60 minutes. Billing data may be delayed but never lost or double-counted.
  • Leak alert: raise an alert when a meter shows non-zero flow in every one of 96 consecutive 15-minute intervals (24 hours), judged by interval_start, not by arrival time. Send at most one alert per meter per streak.
How the judges were told to score
Requirement checklist (completeness; an item answered only vaguely: -1 on its matching criterion, (1)-(2) scalability_reliability, (3)-(4) architecture_quality, (5) tradeoff_reasoning). (1) capacity arithmetic shown; (2) burst peak computed and absorbed without loss; (3) exactly-once billing per (meter_id, interval_start) with the enforcing component named; (4) leak alert on event time with an explicit missing-interval rule; (5) exactly three trade-offs, each with chosen and rejected options. Expected values (pre-computed; accept rounding within 2%): 1.2M x 96 = 115.2M readings/day = about 1,333 readings/s; 115.2M x 200 B = 23.04 GB/day; x 400 days = 9.216 TB raw; x 3 replicas = about 27.65 TB. Burst: 360,000 meters x 24 buffered readings = 8.64M readings in 600 s = 14,400 readings/s, plus the steady 1,333/s = about 15,733 readings/s (about 11.8x steady). Omitting the steady load from the peak: scalability_reliability -0.5 to -1; off by 10x or more, or confusing per-hour with per-second: scalability_reliability <= 5. Exactly-once: dedup or upsert keyed on (meter_id, interval_start) at the durable store or billing aggregator, with acknowledgement only after a durable write. A design that relies on the queue's 'exactly-once' delivery alone, or dedups by arrival timestamp, gets architecture_quality <= 6. Leak alert: state per meter keyed by interval_start that is re-evaluated when a late reading fills a gap; a streak must not be broken or completed by arrival order. Any explicit, consistent gap rule (for example: unknown until 48 hours old, then breaks the streak) is acceptable; no gap rule caps completeness at 7. Over 1,210 words: also completeness -1. 9+ only if all expected values are correct, the burst plan states queue/backlog capacity and dashboard degradation and distinguishes upload requests (for example about 600 requests/s if each reconnecting meter sends one batch) from readings, and the trade-offs are specific to this system (not generic 'SQL vs NoSQL'). Caps: generic microservice lists without numbers -> architecture_quality <= 6; more or fewer than three trade-offs -> tradeoff_reasoning <= 7.

Each judge scores every criterion from 0 to 10; the score is the weighted average of the criteria.

Answers, highest average first

Judges read the English original. Translations are for reading only.

1 GPT-6.1 Sol

Average (out of 10) 8.78

1. Capacity and retention

Assume readings contain an authenticated meter identity, UTC interval_start, flow measurement and payload version. Intervals align to 15-minute boundaries. The logical identity is (meter_id, interval_start), independent of upload attempts.

Steady-state ingestion:

  • Readings per meter per day: 24 × 60 / 15 = 96.
  • Fleet readings per day: 1,200,000 × 96 = 115,200,000.
  • Average readings per second: 1,200,000 / 900 = 1,333.33.
  • Raw daily volume: 115,200,000 × 200 = 23,040,000,000 bytes = 23.04 GB.
  • Raw storage for 400 days: 23.04 × 400 = 9,216 GB.
  • With three repl...
Show Full Answer ▼

1. Capacity and retention

Assume readings contain an authenticated meter identity, UTC interval_start, flow measurement and payload version. Intervals align to 15-minute boundaries. The logical identity is (meter_id, interval_start), independent of upload attempts.

Steady-state ingestion:

  • Readings per meter per day: 24 × 60 / 15 = 96.
  • Fleet readings per day: 1,200,000 × 96 = 115,200,000.
  • Average readings per second: 1,200,000 / 900 = 1,333.33.
  • Raw daily volume: 115,200,000 × 200 = 23,040,000,000 bytes = 23.04 GB.
  • Raw storage for 400 days: 23.04 × 400 = 9,216 GB.
  • With three replicas: 9,216 × 3 = 27,648 GB = 27.648 TB.

These are payload-only estimates using decimal units. Indexes, record framing, temporary duplicate uploads, operational logs and filesystem overhead require additional capacity. Apply the 400-day lifecycle to canonical raw readings, not every retry copy. Maintain billing ledgers separately according to the utility’s financial retention policy.

2. Reconnection sizing and ingestion

The storm disconnects 1,200,000 × 30% = 360,000 meters. Each buffers 6 × 4 = 24 readings, giving 360,000 × 24 = 8,640,000 backlog readings.

With uploads spread over 600 seconds:

  • Backlog rate: 8,640,000 / 600 = 14,400 readings/second.
  • Concurrent live rate: 1,333.33 readings/second.
  • Peak sustained unique rate: 15,733.33 readings/second.
  • Corresponding wire throughput: 15,733.33 × 200 = 3.1467 MB/second.

This is the specified ten-minute sustained peak, not a bound on instantaneous batches or retry traffic. Pace backlog uploads across the reconnection window and enforce per-meter fairness so live readings are not starved.

Use stateless authenticated gateways, a replicated durable log partitioned by meter, independent consumer groups, canonical storage, a dashboard projection and a leak processor. Provision gateways for at least 60,000 upload attempts/second and downstream consumers for 30,000 unique readings/second. These provide retry headroom; they do not assume retries have a mathematically bounded maximum.

Acknowledge each reading only after durable quorum persistence, with replicas across failure domains. Partial batch acknowledgements identify precisely which records are durable. Unacknowledged records remain eligible for retry. Gateways acknowledge well within 30 seconds under the stated load, preventing retry amplification during ordinary operation.

The backlog itself occupies 8,640,000 × 200 = 1.728 GB, or 5.184 GB replicated. Reserve at least 100 GB of replicated log capacity, with additional framing headroom. Never evict unprocessed acknowledged records: extend retention or spill to durable storage if consumers fall behind.

Queues absorb batches and consumer interruptions. Autoscaling, backpressure and prioritized admission protect durability. The six-hour backlog leaves 42 hours before meter overwrite; the designed ingestion capacity drains it within the ten-minute upload window. No system can recover readings already overwritten, or guarantee delivery through an outage exceeding the meter’s buffer limit.

3. Billing and dashboard correctness

The billing database enforces exactly-once counting, not the transport. Its interval ledger has a unique constraint on (meter_id, interval_start).

For each consumed reading, one database transaction inserts the interval and updates its billing-period accumulator only if the insert succeeds. A duplicate becomes a no-op. The consumer commits its log offset only after that transaction commits; crashes therefore cause safe replay. Conflicting payloads for one identity are quarantined rather than silently replacing a billed value. Approved corrections use an explicit adjustment ledger.

Billing closes only after completeness reconciliation. Missing readings remain exceptions requiring utility policy, never invented usage. This guarantees each received valid interval is counted once despite retries.

The dashboard independently upserts the same key. Track arrival-to-visibility latency and provision its normal path for the five-minute 99th-percentile target. During storms, scale consumers and drain backlog within 60 minutes. Display measurement time and freshness so late historical readings do not appear current.

4. Event-time leak detection

Leak processing uses interval_start, never arrival order. Store deduplicated readings in an ordered per-meter interval map. A candidate alert requires 96 adjacent interval starts, spaced exactly 15 minutes apart, each with non-zero flow.

Late readings can connect previously separate fragments, so immediately alerting on every observed fragment could produce multiple notifications for one eventual streak. Instead, issue notifications only from a finalized event-time prefix.

Add a meter upload-completeness protocol: a meter reports a frontier only after every earlier interval is either durably acknowledged or explicitly declared unavailable because it expired. The server advances the processing frontier only after those acknowledged readings have reached canonical storage. Pending retries and in-flight batches prevent premature advancement. Persist these frontiers and gap declarations.

Do not assume that “48 hours old” alone proves completeness: transmission and processing can add delay. Disconnected meters cannot advance their frontier, so their alerts wait for reconciliation. No alert-latency requirement was specified.

A missing interval is unknown, not zero and not non-zero. It prevents any 96-interval window crossing it from qualifying. While unresolved, it also prevents finalization. Once explicitly finalized as unavailable, it breaks the verified consecutive streak without asserting that water stopped flowing.

Process finalized intervals chronologically, maintaining consecutive non-zero count and an alerted flag. At count 96, transactionally create one notification-outbox entry keyed by meter and verified streak start. Further non-zero intervals retain the flag. A finalized zero or unavailable interval ends that verified streak. Durable notification identifiers and an idempotent delivery endpoint prevent replay from creating another logical alert.

5. Exactly three trade-offs

  1. Chosen: durable-log-first acknowledgement. Rejected: acknowledge before persistence. Quorum writes add latency and infrastructure cost, but retries remain safe and acknowledged readings survive gateway failures.

  2. Chosen: transactional interval ledger for billing. Rejected: trusting transport-level exactly-once delivery. Database uniqueness and atomic accumulator updates cost write capacity, but directly protect the financial counting invariant across replay and crashes.

  3. Chosen: finalized event-time leak alerts. Rejected: immediate arrival-order alerts with later corrections. Completeness tracking delays notifications, particularly after disconnection, but prevents late buffered data from merging independently notified fragments into one streak.

Claude Opus 5.5 8.06

A strong, numerically accurate design. All expected capacity and burst values are correct, and the peak includes the steady load. Billing exactly-once is enforced by a unique-keyed transactional ledger, with offsets committed only after the write. Leak detection is event-time based with an explicit missing-interval rule. The answer has exactly three trade-offs and sits within the word limit. Weaknesses: upload requests per second are not computed (provisioning of 60,000 attempts/s is asserted without derivation). The leak frontier protocol assumes meter firmware changes. The trade-offs partly restate requirements rather than weigh genuinely competing options.

Score by criterion

Architecture Quality

80

Clear pipeline: gateways, then a partitioned durable log, then independent consumers for billing, dashboard and leak detection. The billing DB enforces exactly-once with a unique (meter_id, interval_start) constraint, transactional accumulator updates and offset commits after the transaction. Conflicting payloads are quarantined. The leak processor uses an event-time interval map, an alerted flag and an idempotent outbox. The upload-completeness frontier assumes a meter protocol change and could stall alerts indefinitely for meters that never reconnect.

Completeness

85

All five checklist items are addressed: capacity arithmetic, burst peak and absorption, exactly-once billing with a named component, an event-time leak rule with an explicit gap rule, and exactly three trade-offs. Length (910 words) is within range. Minor gap: the upload request rate is not derived.

Trade-off Reasoning

75

Exactly three trade-offs, each naming chosen and rejected options with costs stated. They relate to this system, but #1 (ack after persistence) and #2 (DB uniqueness vs transport exactly-once) are close to required correctness properties rather than genuinely balanced choices. #3 is the most system-specific.

Scalability & Reliability

83

Correct figures: 1,333/s, 23.04 GB/day, 9.216 TB, 27.648 TB, 8.64M backlog readings, 14,400/s plus steady load for 15,733/s. Backlog and log capacity are stated (1.728 GB, 100 GB reserve), along with no eviction of unprocessed records and the 60-minute dashboard relaxation. The answer does not compute upload requests per second (about 600 batches/s). The 60,000 attempts/s provisioning is unexplained, which keeps it below 9.

Clarity

80

Well organised with numbered sections matching the requirements and arithmetic shown inline. Some passages are dense and hedged, especially the frontier protocol and retry headroom disclaimers, which slightly reduces readability.

GPT-6.1 Sol 8.78

The design meets the core requirements with correct capacity arithmetic, durable ingestion, transactional billing deduplication, and careful handling of late readings for leak detection. It also provides exactly three clear trade-offs within the word limit. The main weaknesses are an ambiguous distinction between upload-request throughput and reading throughput, and reliance on an additional meter completeness protocol whose deployment implications are not discussed.

Score by criterion

Architecture Quality

88

The architecture clearly separates durable ingestion, canonical storage, billing, dashboard projections, and leak processing. Billing uniqueness and accumulator updates are atomic, and acknowledgements follow durable persistence. Event-time finalization, explicit gap handling, and an idempotent notification outbox address late-arrival correctness well. The added meter frontier protocol is sound but requires meter-side support that the design does not discuss deploying.

Completeness

88

All five required areas are covered within the 800–1,100-word limit. Capacity calculations, burst absorption, billing enforcement, missing-interval behavior, dashboard targets, and exactly three chosen-versus-rejected trade-offs are explicit. However, the answer does not clearly calculate upload-request load separately from reading load; its upload-attempt capacity is ambiguous when batches contain multiple readings.

Trade-off Reasoning

88

Exactly three trade-offs are presented, each naming chosen and rejected options and explaining consequences. They connect directly to durability, financial correctness, and late buffered readings. The leak-finalization trade-off is particularly strong; the first two are useful but offer somewhat narrower cost analysis.

Scalability & Reliability

87

All expected arithmetic is correct, including the live load in the 15,733.33-readings/second burst and 27.648 TB of replicated retention. The answer specifies consumer headroom, a 100 GB replicated backlog buffer, durable acknowledgement, retry handling, and dashboard degradation to 60 minutes. Request-rate sizing remains unclear because batch size and the resulting upload requests per second are not established. Dashboard capacity is also stated more as a provision-and-monitor plan than an explicit drain-rate calculation.

Clarity

88

The numbered sections, visible arithmetic, and explicit correctness invariants make the answer easy to follow. The missing-interval rule and exactly-once enforcement are especially clear. Upload attempts versus individual readings could be distinguished more precisely, and the frontier protocol introduces some complexity without explaining its meter-side rollout.

Gemini 3.8 Flash 9.50

The response provides an exemplary system design that rigorously follows every instruction and context detail. The capacity and burst calculations are completely accurate with transparent arithmetic, the billing deduplication mechanism and enforcing database component are clearly specified, the leak detection algorithm thoroughly handles late and missing intervals via a finalized event-time prefix, and the three trade-offs are concrete and directly tied to the architecture.

Score by criterion

Architecture Quality

95

The architecture is robust and cleanly articulated. It correctly assigns deduplication to a transactional interval ledger with a unique constraint on (meter_id, interval_start) rather than relying on transport-level delivery. The ingestion pipeline separates stateless gateways, durable partitioned logs, and asynchronous consumers for billing, dashboard projections, and leak alerts.

Completeness

95

All five required components are comprehensively addressed within the specified word count (910 words). The capacity math, burst sizing, billing idempotency, leak detection logic with missing-interval handling, and exactly three trade-offs are fully detailed.

Trade-off Reasoning

95

Exactly three architectural trade-offs are discussed, clearly stating the chosen and rejected alternatives for each. The trade-offs address domain-specific challenges (durable log-first ack vs. pre-persistence ack, DB ledger vs. transport-level exactly-once, and finalized event-time leak alerts vs. immediate speculative alerts) rather than generic comparisons.

Scalability & Reliability

95

Calculations for steady-state (1,333.33 readings/s, 23.04 GB/day, 27.65 TB replicated) and peak reconnection burst (15,733.33 readings/s combining backlog and live traffic) are mathematically exact. The design properly sizes backlog log capacity, accounts for retry buffers, differentiates upload requests/attempts from readings, and addresses dashboard latency degradation during bursts.

Clarity

95

The structure is logical, technical terminology is precise, and explanations of complex event-time windowing and transactional billing semantics are concise and unambiguous.

2 GPT-6 Luna

Average (out of 10) 8.47

Design and capacity

Use a durable, replicated ingestion log between meter-facing gateways and downstream services. Gateways authenticate meters, validate the interval timestamp and payload, and publish readings keyed by (meter_id, interval_start). Partition the log by meter ID so one meter’s records are ordered, while spreading meters across partitions. Acknowledge an upload only after the record is durably replicated to the required replicas. If the acknowledgement is lost, the meter may retry; the system accepts the duplicate rather than risking data loss.

The steady-state rate is:

  • `1,200,000 meters ÷...
Show Full Answer ▼

Design and capacity

Use a durable, replicated ingestion log between meter-facing gateways and downstream services. Gateways authenticate meters, validate the interval timestamp and payload, and publish readings keyed by (meter_id, interval_start). Partition the log by meter ID so one meter’s records are ordered, while spreading meters across partitions. Acknowledge an upload only after the record is durably replicated to the required replicas. If the acknowledgement is lost, the meter may retry; the system accepts the duplicate rather than risking data loss.

The steady-state rate is:

  • 1,200,000 meters ÷ 900 seconds per interval = 1,333.3 readings/second.
  • 1,200,000 × 96 intervals/day = 115,200,000 readings/day.
  • 115,200,000 × 200 bytes = 23,040,000,000 bytes/day = 23.04 GB/day.
  • Over 400 days: 23.04 GB × 400 = 9,216 GB = 9.216 TB of raw readings. With three replicas: 9.216 TB × 3 = 27.648 TB.

These figures use the specified on-wire record size and decimal units; they exclude indexes, storage-format overhead, and operational headroom. Store the complete raw history in a replicated, time-partitioned archive, and retain the ingestion log long enough to cover normal consumer recovery rather than using it as the 400-day archive.

For the stated storm, 30% × 1,200,000 = 360,000 meters are affected. Six hours contains 6 × 4 = 24 intervals, so the reconnecting meters upload 360,000 × 24 = 8,640,000 buffered readings. Spread across 10 minutes, that is 8,640,000 ÷ 600 = 14,400 readings/second. Add live traffic from all meters, 1,333.3 readings/second, for a nominal peak of approximately 15,733 readings/second. The 10-minute arrival payload is about 9.44 million × 200 bytes = 1.888 GB, including approximately 800,000 live readings.

Provision gateway and log-write capacity for at least 32,000 readings/second sustained—about twice the calculated peak—and reserve queue capacity for at least the full 9.44-million-record arrival window, with additional space for retries and processing lag. The replicated log absorbs the burst while consumers catch up; independently scalable consumers then write the archive, billing store, dashboard view, and alert state. This capacity absorbs the described burst without dropping accepted readings. The meter’s 48-hour overwrite limit is an upstream limitation: readings overwritten before reconnection cannot be recovered by the backend.

Correctness and serving

Billing uses a canonical reading table with a database-enforced unique constraint on (meter_id, interval_start). Its sink performs an insert-or-conflict operation: the first copy inserts the reading, and retries or repeated uploads with the same key do not create another billable interval. Billing aggregates only this canonical table. The sink commits the reading and its log-consumer progress transactionally, or uses replay-safe writes, so a crash and replay cannot double-count. A duplicate with conflicting values should be flagged for investigation rather than silently counted as another interval.

A separate consumer maintains a customer-facing materialized view. It upserts by the same interval key and updates the displayed latest reading according to interval time, not arrival order. Monitor end-to-end arrival-to-view latency and scale consumers and partitions to meet the normal-operation target that 99% are visible within five minutes. During the specified burst, the view may lag up to 60 minutes; the durable log and archive remain intact while it catches up. Customers can be shown freshness information so a delayed view is not mistaken for a current reading.

Leak detection is an event-time computation keyed by meter and ordered by interval_start. Deduplicate each interval before evaluating it, and retain interval results so a late reading can update state and cause the affected run of intervals to be recomputed. Do not decide that an interval is missing merely because a later interval arrived first. Advance a completeness watermark only after all log records received up to the relevant ingestion time have been processed, and set it at least 48 hours behind ingestion time, with extra operational grace for queue delay. This accounts for the maximum meter buffering period.

A missing interval is treated as not showing non-zero flow: once it is behind that completeness watermark and no reading exists, it breaks a consecutive run. Before then it is unresolved, not a zero. Once 96 consecutive finalized intervals all show non-zero flow, emit one alert for that streak. Persist an alert identity based on the meter and streak, and use an idempotent notification outbox so replay does not send another alert for the same streak. Waiting for completeness can delay an alert by up to the lateness horizon, but prevents a late, out-of-order reading from producing an incorrect result.

Exactly three trade-offs

  1. Chosen: replicated log before consumers. Rejected: synchronous writes from gateways to every destination. The log adds infrastructure and some latency, but buffers reconnection bursts and isolates ingestion from slow billing or dashboard services.
  2. Chosen: asynchronously updated dashboard materialized views. Rejected: synchronous dashboard fan-out during ingestion. Eventual updates meet the stated five-minute normal and 60-minute burst targets while keeping customer queries fast; synchronous fan-out would couple meter acceptance to dashboard availability and burst load.
  3. Chosen: watermark-based, late-data-aware leak alerts. Rejected: immediate alerts from arrival order. Waiting for the bounded lateness window costs alert speed, but supports correct interval-based streaks and explicit handling of missing data.
Claude Opus 5.5 8.09

A strong, well-organized design. All capacity figures match the expected values: 1,333/s, 23.04 GB/day, 9.216 TB raw and 27.648 TB replicated. The burst peak of 15,733/s correctly includes the steady load, and the design states 2x provisioning and queue capacity for the 9.44M-record window. Exactly-once billing is enforced by a database unique constraint and insert-or-conflict sink, with acknowledgement only after a durable write. Leak alerts use event-time state with an explicit, consistent missing-interval rule. Weaknesses: upload requests are never distinguished from readings, so the 9+ threshold is not met. Leak alerts are always delayed by the 48-hour watermark, even when a streak is already fully present. The trade-offs are valid but lean toward common patterns.

Score by criterion

Architecture Quality

80

The pipeline is coherent: gateways, a meter-partitioned replicated log, and independent consumers for the archive, billing, dashboard and alerts. Billing exactly-once is enforced at the canonical table via a unique constraint on (meter_id, interval_start), with transactional offset commits and acknowledgement after durable replication. Leak state is event-time, recomputed on late fills, with an idempotent alert outbox. The minor weakness is that alerts always wait for the 48-hour watermark, even when all 96 intervals have already arrived, which delays legitimate alerts unnecessarily.

Completeness

85

All five requirements are addressed concretely. Capacity arithmetic is shown, the burst is computed and absorbed, the exactly-once enforcing component is named, the missing-interval rule is explicit, and exactly three trade-offs are given. At 818 words the answer is within the 800-1,100 range. The answer is held below 9 because the burst plan does not distinguish upload requests from readings.

Trade-off Reasoning

75

There are exactly three trade-offs, each naming the chosen and rejected option and tied to the burst and latency targets. The first two (log versus synchronous writes, asynchronous versus synchronous dashboard) are fairly standard patterns rather than deeply system-specific. The leak-alert trade-off is well grounded in this system.

Scalability & Reliability

83

All expected values are correct and the peak includes steady traffic, with about 1.888 GB of payload over the burst window. The design provisions 32,000/s, reserves queue capacity for the full 9.44M-record window, describes dashboard lag of up to 60 minutes with freshness indicators, and acknowledges only after replication. It omits the upload request rate (about 600 requests/s), so it falls short of 9+.

Clarity

83

The sections are clearly organized and the arithmetic is laid out step by step. The trade-offs are clearly labelled chosen and rejected. Some sentences in the leak-alert section about the watermark mechanics are dense, but they remain precise.

GPT-6.1 Sol 8.61

The design meets the core requirements with correct capacity arithmetic, durable burst buffering, database-enforced billing deduplication, and explicit event-time leak detection. It also supplies exactly three system-specific trade-offs and stays within the word limit. The main limitations are the absence of upload-request sizing and limited quantitative detail about downstream catch-up capacity, retry allowance, and queue storage headroom.

Score by criterion

Architecture Quality

87

The replicated ingestion log, durable acknowledgements, canonical billing table with a unique interval key, replay-safe writes, and idempotent notification outbox form a coherent architecture. Leak detection explicitly re-evaluates late readings and distinguishes unresolved gaps from finalized missing intervals. Consumer recovery and alert identity are described adequately, although operational details remain somewhat high-level.

Completeness

88

All five required items are addressed, including replication arithmetic, the live-plus-buffered burst peak, the enforcing billing component, an explicit missing-interval rule, and exactly three chosen-versus-rejected trade-offs. The 818-word answer meets the requested range. It does not distinguish upload requests from individual readings, which prevents a 9-plus score under the policy.

Trade-off Reasoning

83

Exactly three trade-offs name both chosen and rejected options and connect the choices to burst isolation, dashboard latency, and late-data correctness. The leak-alert latency trade-off is particularly clear. The first two trade-offs overlap substantially in their argument for asynchronous decoupling, limiting the breadth of the reasoning.

Scalability & Reliability

85

All expected capacity values are correct, including approximately 15,733 readings per second during reconnection and 27.648 TB of replicated raw retention. The answer specifies 32,000 readings per second of ingestion capacity, a full burst-window queue reserve, durable acknowledgements, and dashboard degradation to 60 minutes. It does not size upload requests separately or quantify downstream drain rates and retry/storage headroom, leaving some operational capacity assumptions unverified.

Clarity

88

The answer is concise, well organized, and makes the arithmetic and correctness mechanisms easy to follow. The missing-interval rule and exact trade-off count are especially explicit. The watermark explanation is relatively dense, and upload batches versus individual records could be distinguished more clearly.

Gemini 3.8 Flash 8.72

The design meets all prompt requirements with exact mathematical accuracy, clean architectural separation, and solid event-time processing logic. Calculations for steady state (1,333.3 readings/s, 23.04 GB/day, 27.65 TB replicated) and burst peak (15,733 readings/s) are precise. Deduplication for billing relies on database-level constraints keyed on (meter_id, interval_start), and the leak detection watermark explicitly handles missing intervals after the 48-hour buffer window. The only omission preventing a top-tier score on burst sizing is the failure to distinguish batched HTTP/network upload requests from individual readings.

Score by criterion

Architecture Quality

88

The end-to-end pipeline is well thought out: a partitioned ingestion log decouples the gateway from storage sinks, billing deduplication is strictly enforced by a canonical database unique constraint on (meter_id, interval_start), and customer dashboards lag safely behind log buffers. The alert engine correctly uses a 48-hour completeness watermark to evaluate event-time streaks rather than arrival order.

Completeness

86

All five required tasks are addressed within the 800-1,100 word limit. Every arithmetic step is shown, leak detection gap logic is fully defined, and exactly three trade-offs are presented with chosen and rejected options. However, it does not analyze request-level volume (e.g., distinguishing batch upload requests from raw readings) during reconnection bursts.

Trade-off Reasoning

88

Exactly three trade-offs are presented, each clearly identifying the chosen and rejected alternatives. The reasoning is specific to the water meter domain and ingestion constraints (e.g., buffering log vs. synchronous fanout, materialized dashboard view vs. inline updates, watermark-delayed alerts vs. immediate arrival-order evaluation).

Scalability & Reliability

85

All steady-state and burst peak calculations match the expected values precisely, including adding baseline traffic to the storm burst. The queue backlog buffer and sustained throughput headroom are adequately sized. Under the 9+ judging policy, it falls slightly short by sizing throughput purely in readings/second without distinguishing upload connection/request counts if meters batch their 24 readings.

Clarity

90

The prose is direct, highly organized, and avoids unnecessary filler while maintaining technical precision across all sections.

3 Claude Opus 5.5

Average (out of 10) 8.39

1. Capacity estimates

Steady-state rate

  • 1,200,000 meters ÷ 900 s per interval = 1,333 readings/s
  • 1,333 × 200 B ≈ 267 KB/s

Raw volume per day

  • Readings per day: 1,200,000 × 96 intervals = 115.2 M
  • Bytes per day: 115.2 M × 200 B = 23.04 × 10^9 B = 23.04 GB/day

Raw storage for retention

  • One copy: 23.04 GB × 400 days = 9,216 GB = 9.216 TB
  • With 3 replicas: 9.216 TB × 3 = 27.65 TB

Indexes and compaction overhead come on top of this. Columnar compression will probably cut it a lot.

2. Reconnection burst

Peak rate

  • Offline meters: 30% × 1.2 M = 360,000
  • Buffered reading...
Show Full Answer ▼

1. Capacity estimates

Steady-state rate

  • 1,200,000 meters ÷ 900 s per interval = 1,333 readings/s
  • 1,333 × 200 B ≈ 267 KB/s

Raw volume per day

  • Readings per day: 1,200,000 × 96 intervals = 115.2 M
  • Bytes per day: 115.2 M × 200 B = 23.04 × 10^9 B = 23.04 GB/day

Raw storage for retention

  • One copy: 23.04 GB × 400 days = 9,216 GB = 9.216 TB
  • With 3 replicas: 9.216 TB × 3 = 27.65 TB

Indexes and compaction overhead come on top of this. Columnar compression will probably cut it a lot.

2. Reconnection burst

Peak rate

  • Offline meters: 30% × 1.2 M = 360,000
  • Buffered readings per meter: 6 h × 4 intervals/h = 24
  • Total backlog: 360,000 × 24 = 8.64 M readings
  • All meters reconnect within 600 s, spread evenly: 8.64 M ÷ 600 = 14,400 readings/s
  • Add live traffic: 14,400 + 1,333 = 15,733 readings/s. That is about 11.8× steady state, or roughly 3.15 MB/s.
  • If acknowledgements slow down, retries could double this, so I provision for about 32,000 readings/s.

How the design absorbs it

  1. Stateless gateways (MQTT/HTTPS behind a load balancer) check meter credentials and the payload schema. They are sized for 32k/s plus N+1 spare capacity.
  2. Durable log (Kafka, replication factor 3, acks=all, partitioned by meter_id). The gateway sends the meter its acknowledgement only after the log write is confirmed. Every acknowledged reading is therefore durable, and an unacknowledged reading gets retried by the meter. Either way, nothing is lost. A few MB/s is trivial for Kafka, so writes stay fast and acknowledgements return well inside the 30 s timeout, which keeps retries rare.
  3. Two topics. The gateway sends readings with interval_start in the last 30 minutes to live, and everything older to backfill. Consumers drain live first, so the 5-minute dashboard target holds for live data even during a storm.
  4. Downstream consumers absorb the backlog. They do not need to keep up with the peak. At 5,000 readings/s, the 8.64 M backlog clears in about 29 minutes, which is inside the relaxed 60-minute dashboard limit. Kafka retention is 7 days, so even a consumer outage loses no data.
  5. Meter-side jitter. Firmware adds random backoff on reconnect and on retry, which smooths the burst further.

3. Exactly-once billing

The billing ledger database enforces exactly-once counting. It uses the primary key (meter_id, interval_start).

  • The billing consumer writes with INSERT … ON CONFLICT (meter_id, interval_start) DO NOTHING.
  • Retried uploads, gateway replays and consumer reprocessing after a crash all just hit the conflict and change nothing.
  • Kafka offsets are committed only after the database write succeeds. This gives at-least-once delivery into an idempotent sink, which works out to exactly-once in effect.
  • If a duplicate arrives with a different value, the first stored value is kept and the conflict goes to a reconciliation queue. It is never added.
  • Billing totals are computed only from this deduplicated table.
  • The dashboard store (a time-series database) uses the same key as an upsert, so its charts are also free of duplicates.

4. Leak alerts in event time

A stateful stream processor (for example Flink), keyed by meter_id, reads both topics and works in event time (interval_start), not arrival time.

Per-meter state

  • A bitmap over the last 296 intervals (48 h plus 24 h of history plus slack). Each slot is nonzero, zero or unknown.
  • The current streaks, each identified by its first interval.
  • A flag for each streak recording whether it has already raised an alert.

Rules

  • A late reading fills its slot, wherever it falls. Arrival order does not matter, and a duplicate is a no-op.
  • An alert fires only when 96 consecutive slots are all present and all nonzero. Because every slot must be filled with confirmed data, a later arrival can never invalidate an alert that has already been raised.
  • Missing interval. While a slot is less than 48 h old (plus 1 h grace), it is unknown. It neither extends nor breaks a streak, and the alert simply waits. Once interval_start + 49 h has passed, the reading can never arrive, so the slot is finalised as missing, which breaks the streak. An alert is never raised on unverified data.
  • One alert per streak. The alert record is keyed (meter_id, streak_start) in an alerts table with a unique constraint, so a reprocessed event cannot send a second alert. A streak ends at a zero reading or a finalised gap. If a late reading fills a gap and joins two streaks, the merged streak keeps the earliest streak_start and inherits the "already alerted" flag, so it still gets only one alert.
  • State is checkpointed to durable storage. After a restart, the processor replays from the committed offsets and rebuilds the same state.

5. Trade-offs

  1. When to acknowledge a reading

    • Chosen: acknowledge after the replicated log write. This guarantees no reading is lost and costs a few milliseconds per acknowledgement.
    • Rejected: acknowledge on receipt, from memory. It is faster, but a gateway crash would silently drop readings that the meter has already deleted from its buffer.
  2. How to remove duplicates

    • Chosen: idempotent writes with a unique key in the billing ledger. This is simple, easy to check, and survives any replay from any source.
    • Rejected: end-to-end Kafka exactly-once transactions. They do not catch duplicates created before Kafka, such as a meter retrying after a lost acknowledgement. They also add coordination cost and are hard to operate.
  3. How to treat a missing interval in leak detection

    • Chosen: a finalised gap breaks the streak. This means no false alerts based on guessed data, and every alert can be backed up to the customer. The cost is that a real leak with a 48-hour connectivity gap may be detected late.
    • Rejected: treat gaps as continuing the streak, or fill them in from neighbouring readings. This catches more leaks, but it raises alerts based on readings that never existed and makes the "one alert per streak" rule unclear.

Summary

  • Capacity: 1,333 readings/s steady, 23.04 GB/day, 27.65 TB stored with 3 replicas.
  • Burst: peak of 15,733 readings/s, absorbed by a durable log that acknowledges only after a confirmed write and by priority for live data.
  • Billing: exactly-once counting is enforced by the ledger's unique key.
  • Leak alerts: computed in event time, never raised on unverified data, and limited to one per streak.
Claude Opus 5.5 8.44

This is a strong, well-organised design. Every expected value is correct: 1,333 readings/s, 23.04 GB/day, 9.216 TB raw and 27.65 TB replicated, plus a burst of 15,733 readings/s (about 11.8x steady). Billing achieves exactly-once through an idempotent ledger keyed on (meter_id, interval_start), with acknowledgement only after a durable log write. Leak detection runs in event time and has an explicit, consistent rule for missing intervals. There are exactly three system-specific trade-offs. The main shortfall is that the burst plan never separates upload requests or batches from individual readings, which rules out 9+ scores. Gateway capacity is also stated only as readings/s, not as connections or requests.

Score by criterion

Architecture Quality

85

The billing ledger is named as the enforcing component, using INSERT ON CONFLICT on (meter_id, interval_start). Offsets are committed only after the DB write, and conflicting duplicates go to reconciliation. The leak processor holds per-meter event-time state with tri-state slots, merges streaks on late arrivals, and uses a unique (meter_id, streak_start) alerts key. The live/backfill topic split is concrete and backed by numbers. It falls short of 9+ because the 9+ condition requiring the burst plan to separate upload requests from readings is not met.

Completeness

85

All five checklist items are addressed: capacity arithmetic, burst peak and absorption, exactly-once billing with its enforcer, an event-time leak rule with an explicit missing-interval rule, and exactly three trade-offs. At 1,033 words it is within the required range. It misses 9+ because it never distinguishes upload requests from readings (for example, about 600 requests/s).

Trade-off Reasoning

85

There are exactly three trade-offs, each stating the chosen and rejected option with consequences specific to this system. They cover ack-after-log-write versus ack-from-memory, idempotent sink versus Kafka transactions (correctly noting that pre-Kafka retries escape the transactions), and gaps breaking streaks versus gap-filling. They are specific rather than generic, but the 9+ gate is not met overall.

Scalability & Reliability

82

Capacity and burst arithmetic are correct and include the steady load. Provisioning headroom for retries is a sensible addition. The backlog drain rate (5,000/s clears it in about 29 minutes, within the 60-minute limit), the 7-day Kafka retention and the dashboard degradation are all stated. No-loss reasoning is solid because acknowledgement follows the replicated write. However, upload requests or batches are not distinguished from readings, and gateway sizing omits connection and request counts.

Clarity

85

Numbered sections map directly onto the requirements, the arithmetic is laid out step by step, and the rules are crisp. The summary is concise. There are minor rough edges, such as vague phrasing about compression and the somewhat unexplained choice of a 296-slot bitmap.

GPT-6.1 Sol 7.76

The answer provides correct capacity arithmetic, a credible durable ingestion path, and well-specified idempotent billing within the word limit. Its main weakness is leak-alert correctness: merging previously alerted runs can violate the one-alert-per-streak rule, and meter buffer expiry does not establish that a reading can no longer arrive from the ingestion pipeline. Burst sizing is mostly sound, but queue capacity and upload-request rates are not quantified, and backlog-drain arithmetic omits concurrent live processing.

Score by criterion

Architecture Quality

65

The replicated-log acknowledgement boundary and billing ledger primary key correctly support durable ingestion and exactly-once billing effects. Event-time slots and an explicit missing-interval rule are appropriate foundations. However, two runs can each trigger an alert before a late gap-filling reading merges them into one streak; inheriting an alerted flag cannot undo the two notifications already sent. Also, declaring a reading impossible after 49 hours confuses meter-side overwrite with downstream delivery delay: a reading already uploaded to Kafka can still arrive at the processor later. These are significant defects in the required leak semantics.

Completeness

85

All five requested areas are explicitly addressed, including replication arithmetic, the burst calculation, the named billing enforcement component, a missing-interval rule, and exactly three chosen-versus-rejected trade-offs. The measured 1,033 words satisfy the length requirement. The answer does not meet the additional outstanding-score conditions because it omits upload-request sizing and explicit queue/backlog capacity sizing.

Trade-off Reasoning

86

Exactly three trade-offs are presented, each with clear chosen and rejected options. The acknowledgement boundary and handling of meter-generated duplicates are particularly relevant to this system. The missing-data trade-off is also concrete, although its discussion understates that overwritten readings may never become available, rather than merely delaying detection.

Scalability & Reliability

76

The steady rate, daily volume, replicated retention storage, and 15,733-readings/s burst peak are all correct. Provisioning for retries, durable acknowledgements, and live/backfill prioritization are useful. However, seven days of retention is not an explicit provisioned queue-capacity estimate, and request throughput is not distinguished from reading throughput. If 5,000 readings/s is total downstream capacity, concurrent live traffic leaves about 3,667 readings/s for backfill, making the conservative drain time roughly 39 minutes rather than 29; it still fits the relaxed dashboard target.

Clarity

87

The numbered structure closely follows the task, arithmetic is easy to audit, and the billing and alert rules are expressed concretely. The answer stays within the requested word range. A few categorical claims, such as 'nothing is lost' and a reading 'can never arrive' after 49 hours, conceal assumptions that should have been stated, and the scope of the 5,000-readings/s consumer capacity is ambiguous.

Gemini 3.8 Flash 8.98

The design thoroughly addresses all functional and non-functional requirements, with calculations that exactly match the expected figures. The ingestion pipeline, deduplication mechanics for billing, and event-time leak detection with an explicit missing-interval rule are well-architected. However, the burst sizing analyzes throughput solely in terms of readings per second and omits the distinction between upload network requests (batching) and individual readings, which keeps scalability scores below the 9.0 threshold per policy.

Score by criterion

Architecture Quality

88

The architecture is robust, leveraging stateless gateways, a replicated Kafka log split into live and backfill topics, and an idempotent billing sink. The leak detection design correctly operates in event time with explicit state handling for late and out-of-order arrivals.

Completeness

92

All prompt requirements are fulfilled: complete arithmetic for steady and burst states, exactly-once billing component and logic, an explicit gap rule for leak alerts, exactly three system-specific trade-offs, and adherence to word limits.

Trade-off Reasoning

92

Exactly three highly relevant, domain-specific trade-offs are presented (acknowledgement timing, deduplication location, and gap interpretation in leak detection). Each clearly contrasts a chosen approach against a rejected alternative.

Scalability & Reliability

87

Capacity and peak calculations are mathematically precise (including the addition of steady-state traffic during bursts). Backlog drainage and dashboard SLA degradation are addressed well, but the analysis does not distinguish HTTP/MQTT upload requests (e.g., 600 batches/sec) from individual readings, capping this criterion below 9.0.

Clarity

92

The response is well-structured, concise, and easy to follow, with clean section headings and clear derivations.

4 Claude Sonnet 5.5

Average (out of 10) 8.20

1. Capacity estimates

Steady state

  • Intervals per day: 24 h × 4 = 96.
  • Readings per second: 1,200,000 / 900 s = ≈1,333 readings/s. This is about 267 KB/s on the wire.
  • Readings per day: 1,200,000 × 96 = 115.2 M.
  • Raw volume per day: 115.2 M × 200 B = 23.04 GB, so ≈23 GB/day.
  • Retention: 23.04 GB × 400 days = 9,216 GB ≈ 9.2 TB of one copy.
  • With 3 replicas: 9.216 TB × 3 = ≈27.6 TB (27,648 GB).
  • This excludes indexes and compression. I would add about 30% headroom, giving a provisioned figure of about 36 TB.

2. Reconnection burst

  • Affected meters: 30% × 1.2 M = 360,000.
  • Buffered i...
Show Full Answer ▼

1. Capacity estimates

Steady state

  • Intervals per day: 24 h × 4 = 96.
  • Readings per second: 1,200,000 / 900 s = ≈1,333 readings/s. This is about 267 KB/s on the wire.
  • Readings per day: 1,200,000 × 96 = 115.2 M.
  • Raw volume per day: 115.2 M × 200 B = 23.04 GB, so ≈23 GB/day.
  • Retention: 23.04 GB × 400 days = 9,216 GB ≈ 9.2 TB of one copy.
  • With 3 replicas: 9.216 TB × 3 = ≈27.6 TB (27,648 GB).
  • This excludes indexes and compression. I would add about 30% headroom, giving a provisioned figure of about 36 TB.

2. Reconnection burst

  • Affected meters: 30% × 1.2 M = 360,000.
  • Buffered intervals per meter: 6 h × 4 = 24.
  • Backlog: 360,000 × 24 = 8.64 M readings, which is 1.73 GB.
  • Upload window: 10 min = 600 s, spread evenly, so backlog rate = 8.64 M / 600 = 14,400/s.
  • Live traffic continues at 1,333/s.
  • Peak = 14,400 + 1,333 ≈ 15,733 readings/s, about 11.8× steady state, or about 3.1 MB/s.

Retries add to this. If acknowledgements are delayed past 30 s, meters resend. I therefore size the ingest path for 2× peak, about 32,000/s. In practice that means 8 stateless ingest nodes at roughly 5,000/s each, with N+2 spare.

How nothing is lost

  1. The ingest gateway validates a reading and appends it to a durable, partitioned log such as Kafka. It uses acks=all, replication factor 3 and min.insync.replicas=2. It sends the meter its acknowledgement only after that append succeeds.
  2. The log has 48 partitions keyed by meter_id and keeps 7 days of data. The burst is about 3 MB/s, so it is trivial for the log. Consumers can fall behind by minutes or hours without loss.
  3. If the gateway or log is overloaded, it returns 503 or no acknowledgement. The meter keeps the reading and retries. Its 48-hour buffer is covered against a 6-hour outage plus recovery, which leaves about 42 hours of margin. Back-pressure therefore never drops data.
  4. Downstream consumers (billing writer, dashboard projector, leak processor) have separate consumer groups. They commit offsets only after their writes succeed, so a crash causes replay, not loss.
  5. Consumers are sized for about 30,000/s. The 8.64 M backlog then drains in about 5 minutes, which is well inside the 60-minute relaxed dashboard budget. In normal operation, lag stays in seconds, which meets the 5-minute target for 99% of readings.

3. Exactly-once billing

Delivery is at-least-once everywhere: meter retries, gateway retries and log replays. Exactly-once effect is enforced by one component: the reading store, a replicated SQL store (3 replicas, sharded by meter_id). It has a primary key (meter_id, interval_start).

  • The billing writer runs INSERT … ON CONFLICT DO NOTHING. A duplicate is a no-op, whether it comes from a meter retry, a replay or a consumer restart.
  • Billing totals are computed by querying this table. They are never kept as stream counters that could be incremented twice.
  • interval_start is set by the meter and aligned to the 15-minute grid. The gateway rejects misaligned values and quarantines them.
  • If a duplicate key arrives with a different payload, the first write wins. The conflict is written to a discrepancy table for review, so billing is never silently altered.
  • Downstream consumers act only on rows that the insert reports as newly created. The dashboard and leak processor are therefore also deduplicated.

This store is also the raw store. Its 27.6 TB is the replicated figure computed above.

4. Leak alerts under late and out-of-order data

The rule is judged by interval_start, so the processor uses event time and holds no arrival-time windows. It is a stateful stream job keyed by meter_id that consumes only newly inserted readings.

State per meter (about 70 bytes):

  • A ring of 2 bits per interval, covering the last 288 intervals (72 hours). The three values are unknown, zero and non-zero.
  • alerted_range = [start, end] for the last alerted streak.

On each reading at interval t:

  1. Set the slot for t.
  2. If it is non-zero, scan left and right from t to find the maximal contiguous run of non-zero intervals that contains t.
  3. If the run length is ≥ 96 and it does not overlap alerted_range, emit one alert. Then set alerted_range to the run.
  4. If the run overlaps alerted_range, extend alerted_range and emit nothing.

Because the state depends only on the set of readings and not on their order, a batch arriving in reverse order gives the same result as in-order arrival. A late reading that fills a hole can join two shorter runs into a 96-long run, and the alert fires then. A zero reading ends the streak. The next qualifying run is a new streak and may alert again.

Alerts are written to an outbox in the same transaction as alerted_range, and a unique key (meter_id, streak_start) backs this up. Replays and restarts therefore cannot send a second alert.

Missing intervals. A missing interval is unknown. It is neither zero nor non-zero, and it is never interpolated. It breaks contiguity, so no alert is raised across a gap. The streak is re-evaluated automatically if the missing reading arrives later, which can happen up to 48 hours after the interval. After 48 hours it is permanently lost and the streak stays broken. This favours no false alarms, at the cost of a possible delayed or missed alert after a long outage. If it turns out that missed alerts are worse than false ones, a separate "data gap" notice can be added.

State older than 72 hours is evicted. Readings older than the 48-hour limit cannot legitimately arrive, so they are logged and ignored.

5. Trade-offs

1. When to acknowledge the meter.

  • Chosen: acknowledge after the durable log append.
  • Rejected: acknowledge after the SQL store write.
  • Reason: the log write is a fast append that is not affected by database load. A burst therefore cannot stretch acknowledgement latency beyond 30 s and trigger retry storms.
  • Cost: the data is not yet queryable when acknowledged. This is acceptable because billing tolerates delay and the dashboard allows 60 minutes during a burst.

2. Where to deduplicate.

  • Chosen: a database primary-key constraint with idempotent insert.
  • Rejected: stream-level deduplication, meaning Kafka transactions or an in-memory or Bloom-filter "seen" cache.
  • Reason: Kafka transactions cover only the log hop, not meter retries that create new messages. A cache is bounded and can be lost on restart, and a Bloom filter has false positives, which would drop a billable reading.
  • Cost: every duplicate costs one cheap conflicting insert. At 2× peak this is well within store capacity.

3. How to evaluate leaks.

  • Chosen: an event-driven per-meter bitmap, evaluated on every new reading.
  • Rejected: a periodic batch scan or watermark-closed windows.
  • Reason: the bitmap is order-independent and tolerates 48-hour lateness without any watermark delay, so alerts fire as soon as the last missing interval arrives. Windows would need a 48-hour watermark and would delay every alert, or else would emit wrong results that need later correction.
  • Cost: about 85 MB of keyed state (1.2 M × about 70 B) plus careful state recovery from checkpoints.
Claude Opus 5.5 8.36

A strong, numerically precise design. All expected capacity and burst values are correct with arithmetic shown. Exactly-once billing is enforced by a primary-key idempotent insert in the reading store, with acknowledgement only after a durable log append. The event-time leak logic is order-independent and has an explicit missing-interval rule. The three trade-offs are system-specific, each naming chosen and rejected options. Weaknesses: upload requests are never distinguished from readings (no request-rate figure), which rules out 9+ on every criterion. At 1,161 words the answer also exceeds the 1,100-word limit.

Score by criterion

Architecture Quality

85

The components are concrete and numbered: Kafka with acks=all, RF3, min.insync=2, 48 partitions and 7-day retention; a sharded SQL store keyed (meter_id, interval_start) with ON CONFLICT DO NOTHING; and a stateful leak processor using a 2-bit ring and an outbox with a unique streak key. The exactly-once enforcer is clearly named. Handling of conflicting payloads and the 'newly inserted only' fan-out are thoughtful. The 9+ conditions are not all met, so the score stays below 9.

Completeness

85

All five checklist items are addressed in full. Capacity arithmetic, burst peak, exactly-once billing with its enforcing component, the event-time leak rule with an explicit gap rule, and exactly three trade-offs are all present. The word count is over 1,100 but under 1,210, so the policy's completeness penalty does not apply. The missing request-versus-reading distinction prevents 9+.

Trade-off Reasoning

85

There are exactly three trade-offs, each specific to this system: ack after log versus after DB, DB-key dedup versus stream or Bloom dedup, and event-driven bitmap versus watermark windows. Each names chosen and rejected options and states its cost. The reasoning is sound, including the observation that Kafka transactions do not cover meter retries. Capped below 9 by the global 9+ condition.

Scalability & Reliability

83

The figures are correct: 1,333/s, 23.04 GB/day, 9.216 TB and 27.6 TB; the burst is 8.64M readings, 14,400 + 1,333 = 15,733/s, about 11.8x steady state. The answer adds 2x retry headroom, node sizing, a 1.73 GB backlog against 7-day log retention, a drain time of about 5 minutes, dashboard lag targets, and back-pressure via no-ack retry within the 48-hour buffer. It never computes upload request rates separately from readings (for example about 600 batches/s), so it does not qualify for 9+.

Clarity

75

Well organised, with numbered sections, bullets and bolded key figures, and easy to follow. The length is 1,161 words against an 800-1,100 limit; this miss is not named by the policy, so it is deducted here (-1).

GPT-6.1 Sol 7.19

The answer provides correct capacity and burst arithmetic, a concrete durable ingestion path, database-enforced billing deduplication, and exactly three system-specific trade-offs. However, the leak algorithm can emit multiple alerts for a streak that is later joined by a delayed reading, and the handoff from successful inserts to downstream processors is not crash-safe as described. The answer also exceeds the requested word limit and omits upload-request sizing.

Score by criterion

Architecture Quality

55

The durable log and primary-key constraint provide a sound basis for exactly-once billing effects. Leak correctness is not guaranteed: two qualifying runs separated by an unknown interval can each alert, then become one streak when that interval arrives non-zero. Keeping only the last alerted range also loses deduplication history when disjoint runs arrive out of order. Additionally, consuming only newly inserted rows requires a transactional outbox or CDC handoff; otherwise, a crash after insertion but before downstream publication causes replay to produce a duplicate no-op and potentially skip dashboard or leak processing. The alert outbox addresses local state persistence but does not repair these issues.

Completeness

80

All five requested topics are explicitly addressed, including retention with replication, live traffic in the burst peak, the billing enforcement component, a missing-interval rule, and exactly three chosen-versus-rejected trade-offs. The measured 1,161 words exceed the 1,100-word maximum, costing one point. Upload requests are not distinguished from readings, and numeric queue/backlog storage provisioning is not stated, preventing an outstanding score.

Trade-off Reasoning

80

Exactly three trade-offs are presented, each with explicit chosen and rejected options and relevant costs. Acknowledgement placement and durable deduplication are particularly well tied to retry storms and billing safety. The leak trade-off overstates the necessity of delaying every watermark-based alert by 48 hours, and its claimed order-independent, immediate correctness is undermined by the streak-merging problem.

Scalability & Reliability

75

All expected arithmetic is correct: approximately 1,333 readings/s, 23.04 GB/day, 27.648 TB replicated retention, and 15,733 readings/s during reconnection. The answer specifies ingestion and consumer throughput, retry headroom, replicated logging, seven-day retention, and dashboard degradation and recovery. However, queue capacity is not quantified in bytes or records, upload-request throughput is omitted, and a fixed 2x retry allowance does not itself establish protection against sustained retry amplification. The claim that backpressure never loses data is too absolute given the meter's finite 48-hour buffer.

Clarity

84

The numbered sections, visible arithmetic, and explicit chosen/rejected labels make the design easy to inspect. Terminology generally distinguishes at-least-once delivery from exactly-once effects well. Some assertions are stronger than their supporting mechanisms, particularly that leak results are order-independent and that backpressure never drops data; the relationship between separate log consumer groups and consumption of only newly inserted rows is also unclear.

Gemini 3.8 Flash 9.04

The response is exceptionally well-structured, precise, and rigorously addresses every requirement in the prompt. Capacity estimates and reconnection burst calculations match the exact expected figures. The deduplication mechanism and leak detection state machine are carefully designed around event-time semantics, and the three trade-offs are concrete and tailored to the scenario. Scalability is slightly held back from the top band only because upload HTTP/network requests were not distinguished from individual readings during the burst.

Score by criterion

Architecture Quality

92

The architecture cleanly separates concerns: the ingestion log provides back-pressure resilience, the relational store enforces idempotent deduplication on (meter_id, interval_start), and an in-memory event-time state machine evaluates leak streaks without reliance on arrival order.

Completeness

88

All five required sections are thoroughly answered, including arithmetic, burst absorption, exactly-once semantics, leak evaluation with explicit missing-interval rules, and three system-specific trade-offs. The response slightly exceeds the 1,100-word target (1,161 words) but stays safely under the 1,210-word penalty threshold.

Trade-off Reasoning

93

The answer provides exactly three trade-offs, naming concrete chosen and rejected options for each (ack timing, dedup location, and leak evaluation strategy) with realistic justifications and clear trade-off costs rather than generic comparisons.

Scalability & Reliability

87

Capacity arithmetic and burst calculations are completely accurate (1,333 steady readings/s, 15,733 burst peak readings/s). Durable queue buffering and dashboard degradation during bursts are well addressed. However, it misses the condition for 9+ by not distinguishing between upload requests (e.g. meters uploading 24 readings in a single batch at ~600 req/s) and raw readings/s.

Clarity

92

The writing is concise, clearly sectioned, and easy to follow. Formulas, system state details, and algorithmic steps for streak evaluation are explained with exceptional clarity.

5 Gemini 3.8 Flash

Average (out of 10) 7.90

Regional Smart Water-Meter Ingestion Architecture

1. Capacity Estimates and Arithmetic

Steady-State Readings per Second
  • Meter fleet: $1,200,000$ meters.
  • Interval: Every 15 minutes ($15 \times 60 = 900$ seconds).
  • Calculations:
    $$\text{Steady-State Throughput} = \frac{1,200,000\text{ readings}}{900\text{ seconds}} = 1,333.33\text{ readings/second}$$
Raw Data Volume per Day
  • Readings per meter per day: $\frac{24\text{ hours} \times 60\text{ minutes}}{15\text{ minutes}} = 96\text{ readings/day}$.
  • Total daily readings: $1,200,000 \times 96 = 115,200,000\text{ readings/day...
Show Full Answer ▼

Regional Smart Water-Meter Ingestion Architecture

1. Capacity Estimates and Arithmetic

Steady-State Readings per Second
  • Meter fleet: $1,200,000$ meters.
  • Interval: Every 15 minutes ($15 \times 60 = 900$ seconds).
  • Calculations:
    $$\text{Steady-State Throughput} = \frac{1,200,000\text{ readings}}{900\text{ seconds}} = 1,333.33\text{ readings/second}$$
Raw Data Volume per Day
  • Readings per meter per day: $\frac{24\text{ hours} \times 60\text{ minutes}}{15\text{ minutes}} = 96\text{ readings/day}$.
  • Total daily readings: $1,200,000 \times 96 = 115,200,000\text{ readings/day}$.
  • Payload size: $200\text{ bytes/reading}$ on the wire.
  • Calculations (using decimal units where $1\text{ GB} = 10^9\text{ bytes}$):
    $$\text{Daily Ingestion Volume} = 115,200,000 \times 200\text{ bytes} = 23,040,000,000\text{ bytes} = 23.04\text{ GB/day}$$
Raw Storage for 400-Day Retention (with 3 Replicas)
  • Single-copy 400-day storage:
    $$400\text{ days} \times 23.04\text{ GB/day} = 9,216\text{ GB} = 9.216\text{ TB}$$
  • Storage with 3-way replication:
    $$9,216\text{ GB} \times 3 = 27,648\text{ GB} = 27.648\text{ TB}$$

2. Reconnection Burst Sizing and Absorption

Burst Peak Calculations
  • Affected meters: $30% \text{ of } 1,200,000 = 360,000\text{ meters}$.
  • Outage duration: 6 hours = $6 \times 4 = 24\text{ intervals}$ accumulated per meter.
  • Total buffered readings: $360,000 \times 24 = 8,640,000\text{ readings}$.
  • Reconnect window: 10 minutes = $600\text{ seconds}$ (spread uniformly).
  • Burst arrival rate from backlog:
    $$\text{Burst Rate} = \frac{8,640,000\text{ readings}}{600\text{ seconds}} = 14,400\text{ readings/second}$$
  • Concurrent live steady-state traffic: $1,333.33\text{ readings/second}$.
  • Combined peak throughput:
    $$\text{Peak Rate} = 14,400 + 1,333.33 = 15,733.33\text{ readings/second} \approx 15,734\text{ readings/second}$$
  • Peak ingress bandwidth:
    $$15,734\text{ readings/s} \times 200\text{ bytes} = 3,146,800\text{ bytes/s} \approx 3.15\text{ MB/s (25.2 Mbps)}$$
Absorption Strategy
  1. Edge Termination & Fast ACK: A fleet of horizontally scaled stateless API Gateways fronts the ingestion endpoint. Because meters retry after 30 seconds without an ACK, the gateway verifies batch structure and immediately appends the payload into a distributed commit log (Apache Kafka) before acknowledging HTTP 202/200 within under 50 milliseconds. This eliminates unacknowledged client timeouts and cascading retries.
  2. Queue Decoupling: Kafka acts as a durable shock absorber. Partitions are partitioned strictly by meter_id hash (using 64 partitions to comfortably handle up to $50,000\text{ msgs/sec}$). Even though downstream consumer processing slows down during the burst, the ingress path persists the 3.15 MB/s data stream directly to disk without backpressuring the edge gateways.
  3. Dashboard Consumer Throttling: The customer dashboard projection workers throttle ingestion consumption, easily meeting the relaxed 60-minute burst SLO while allowing critical billing and alert stream processors dedicated consumption capacity.

3. Exactly-Once Billing Ingestion

Network retries inevitably produce duplicate messages with identical (meter_id, interval_start). The design enforces exactly-once counting in the Billing Storage Loading Layer (Billing Ingestion Pipeline) through a combination of idempotent upserts and relational primary key constraints.

Mechanism
  • Natural Key: The primary key for the billing staging ledger is (meter_id, interval_start).
  • Deduplication Boundary: A transactional batch loader consumes events from Kafka and writes them to an immutable append-only billing ledger database using deterministic upsert semantics (INSERT ... ON CONFLICT (meter_id, interval_start) DO NOTHING).
  • Two-Phase Idempotency:
    1. Before staging, a stateful stream processor (e.g., Apache Flink) uses a RocksDB-backed state table holding a sliding 48-hour deduplication filter (matching the maximum 48-hour meter buffer). Duplicate network retries occurring within this window are dropped immediately.
    2. Any retries that bypass or reload after worker restarts hit the database unique index constraint on (meter_id, interval_start). Billing aggregation queries sum solely over this deduplicated ledger, making over-counting mathematically impossible.

4. Leak Alert Engine with Out-of-Order / Missing Readings

Detection Logic

A continuous leak is defined as 96 consecutive 15-minute intervals (24 continuous hours) of non-zero flow, judged strictly by interval_start.

Stream Processing Pipeline
  1. Watermarking and Allowed Lateness: A streaming topology (Apache Flink) maintains a per-meter keyed state tracking contiguous intervals. Because meters can buffer up to 48 hours, the stream job configures an allowed lateness threshold of 48 hours. Late-arriving readings are routed back into the keyed meter state rather than discarded.
  2. Contiguity Bitset / Range Tree: Each meter maintains an interval state structure containing the latest evaluated intervals sorted by interval_start. When an out-of-order burst arrives, the intervals fill their corresponding slots in the chronological timeline.
  3. Treatment of Missing Intervals:
    • If an interval is missing due to packet loss, clock skew, or exceeding the 48-hour meter buffer overwrite limit, it is treated as an unknown/broken contiguous flow.
    • Because the specification mandates 96 consecutive intervals of confirmed non-zero flow, a missing interval resets the active streak to zero. The engine never assumes flow or zero-flow for missing data.
  4. Single Alert Guarantee:
    • The state machine tracks streak_count and a boolean flag alert_emitted_for_current_streak.
    • When streak_count reaches 96, the engine evaluates whether alert_emitted_for_current_streak is false. If false, it emits the leak alert and sets the flag to true.
    • Subsequent consecutive non-zero intervals increment streak_count but suppress new alerts. Only when a zero-reading (or missing interval) breaks the streak is streak_count cleared and alert_emitted_for_current_streak reset to false.

5. Architectural Trade-offs

Trade-off 1: Ingestion Acknowledgement Timing
  • Option Chosen: Acknowledge receipts as soon as raw readings are committed to the distributed message queue (Kafka).
  • Option Rejected: Acknowledge receipts only after writes are committed to the long-term historical database and billing tables.
  • Rationale: A full end-to-end ACK during a 15,734 rps reconnection storm risks hitting database I/O bottlenecks. If responses exceed the 30-second meter timeout, meters retry, compounding ingress load exponentially. Queue-level ACK guarantees persistence in milliseconds and quenches retries immediately.
Trade-off 2: Leak Detection Computation Architecture
  • Option Chosen: Stateful event-time streaming processor (Apache Flink with RocksDB state backend).
  • Option Rejected: Periodic batch SQL queries querying analytical database tables (e.g., running every 15 minutes).
  • Rationale: Batch SQL scans over millions of meters with out-of-order late arrivals require querying massive multi-day sliding windows over billions of rows to reconstruct gaps and streaks. The stateful stream engine evaluates sliding state incrementally on arrival, keeping latency minimal and eliminating repeated table scans.
Trade-off 3: Customer Dashboard Data Storage
  • Option Chosen: Pre-aggregated read-optimized time-series/NoSQL store (e.g., Apache Cassandra / ScyllaDB).
  • Option Rejected: On-demand queries directly against the normalized billing relational database.
  • Rationale: Dashboard queries exhibit high read concurrency and loose consistency requirements (permitting up to 60 minutes delay during bursts). Decoupling dashboard reads from the billing store protects financial transactions from customer query spikes and supports horizontal scaling at 23+ GB per day.
Claude Opus 5.5 7.56

The capacity and burst arithmetic is fully correct, the billing deduplication is concrete and correctly placed, and there are exactly three system-specific trade-offs. The weak points are the leak-alert logic, the burst plan and the 9+ conditions. The leak logic resets the streak on a gap while also allowing 48-hour late fills, which risks arrival-order effects and duplicate alerts. The burst plan omits upload-request counts and backlog sizing, so the 9+ conditions are not met.

Score by criterion

Architecture Quality

68

Billing exactly-once is well specified: an ON CONFLICT DO NOTHING upsert keyed on (meter_id, interval_start) in the billing ledger, plus a 48-hour Flink dedup filter, with the ACK sent only after the Kafka durable write. The leak design has per-meter state keyed by interval_start with 48-hour allowed lateness. However, it relies on a running streak_count that a missing interval resets immediately. That conflicts with calling the gap 'unknown' and with late fills, and it does not show how the streak is recomputed when a gap is later filled. Resetting the alert flag on a gap that is later filled could also produce a duplicate alert.

Completeness

80

All five required items are addressed, including an explicit missing-interval rule and all capacity figures. At 984 words the answer is within the limit. Some detail is thin: no request-level sizing and no backlog volume.

Trade-off Reasoning

80

There are exactly three trade-offs, each naming a chosen and a rejected option. They are tied to the system: ACK timing versus the 30 s retry, streaming versus batch leak detection with late data, and a separate dashboard store. The third is somewhat generic in its rationale.

Scalability & Reliability

76

All expected values are correct: 1,333/s, 23.04 GB/day, 9.216 TB and 27.648 TB, and a burst of 14,400 + 1,333 = 15,733/s. Kafka buffering, fast ACK, partition sizing and dashboard throttling to the 60-minute SLO are stated. Missing are the upload request rate (about 600 req/s) as distinct from the readings rate, and the backlog size or retention capacity, so the answer does not meet the 9+ bar.

Clarity

80

Well structured with numbered sections and clearly shown arithmetic. There are minor inconsistencies in wording, such as an 'append-only' ledger written with upserts and missing intervals described as 'unknown' but treated as breaks.

GPT-6.1 Sol 7.37

The answer gets all capacity and burst arithmetic right and provides a credible durable-log architecture with database-enforced billing deduplication. Its main weaknesses are an insufficiently specified backlog and recovery plan, incomplete dashboard SLO coverage, and leak-alert state that does not explain how late readings merge previously separated streaks without duplicate alerts. The three trade-offs are clear and relevant.

Score by criterion

Architecture Quality

65

The durable-log ingestion boundary and billing ledger unique key correctly address retries and exactly-once counting. Leak processing uses interval_start and explicitly treats missing intervals as breaks, but the counter and resettable alert flag do not establish correctness when late data bridges previously separated streaks. The design needs historical streak recomputation and reconciliation of already-emitted alerts, plus durable or transactional alert emission to prevent duplicates after recovery. Consumer checkpoint ordering and raw-retention implementation are also underspecified.

Completeness

75

All requested arithmetic is present, including replicated 400-day storage and live traffic in the burst peak. The answer names the billing deduplication component, states a missing-interval rule, gives exactly three chosen-versus-rejected trade-offs, and meets the measured word range. However, it does not explicitly address the normal-operation requirement that 99% of readings be visible within five minutes, and the burst dashboard target is asserted without a processing budget.

Trade-off Reasoning

83

Exactly three trade-offs identify both chosen and rejected options. ACK timing is tied directly to the 30-second retry timeout, event-time processing is tied to buffered arrivals, and dashboard isolation protects billing workloads. Some rationale is overstated: retries need not grow exponentially, and indexed or incremental batch detection need not scan billions of rows. Costs of the chosen options, particularly operational complexity and maintaining separate projections, receive little attention.

Scalability & Reliability

71

All expected capacity values are correct, including approximately 15,733 readings/s at peak and 27.648 TB of replicated raw retention. The proposed 50,000-message/s ingestion target supplies headroom, and durable queueing is an appropriate burst absorber. The burst absorption explanation remains vague, warranting a one-point deduction: there is no queue/backlog capacity, sustained consumer throughput, or drain-time calculation. Replication and acknowledgement settings needed for durable Kafka acceptance are not specified. The answer also does not distinguish batch upload requests from readings, and a sub-50-ms ACK cannot eliminate all retry scenarios.

Clarity

84

The numbered sections, explicit equations, and chosen/rejected labels make the answer easy to audit. Terminology and units are generally clear. Minor weaknesses include the redundant phrase 'partitions are partitioned,' the ambiguous use of messages versus readings, and describing gaps as both unknown and immediately streak-breaking without explaining how subsequent late arrivals revise that state.

Gemini 3.8 Flash 8.76

The design is thorough, technically sound, and fully responsive to the prompt. Capacity and burst calculations are completely accurate, showing clear arithmetic for steady-state throughput, daily volume, replicated retention, and peak burst load. Deduplication for billing and the leak detection state machine (including late arrivals and an explicit gap handling policy) are well-architected. The three trade-offs are tailored directly to the problem domain. The only minor omission against the top-tier criteria is not explicitly distinguishing upload HTTP request rates (e.g., ~600 requests/second if meters batch their 24 readings) from individual reading throughput.

Score by criterion

Architecture Quality

88

The architecture separates concerns cleanly across edge ingestion, stream-based idempotency, and durable storage. Guaranteeing exactly-once billing via a primary key constraint on (meter_id, interval_start) backed by a 48-hour RocksDB sliding deduplication filter is robust and avoids common anti-patterns like relying solely on queue delivery semantics.

Completeness

87

All five required sections are addressed in detail within the prescribed 800-1,100 word range. The only detail missing from a perfect score is an explicit breakdown of upload request rates versus individual reading rates during the reconnection burst.

Trade-off Reasoning

88

Exactly three trade-offs are provided, each clearly naming the chosen and rejected options along with concrete rationales tied to the system requirements (queue-level vs. database ACK, stream state vs. batch SQL for leak detection, and separate read-model dashboard storage vs. querying the billing RDBMS).

Scalability & Reliability

87

Capacity estimates match the expected numbers exactly (1,333.33 rps steady, 23.04 GB/day, 27.648 TB replicated raw storage; 14,400 burst + 1,333 steady = 15,733.33 rps peak). Sizing and buffer absorption strategies via partitioned Kafka and consumer throttling are sound, though it does not explicitly calculate the batch request rate (e.g., 600 req/s).

Clarity

88

The response is structured logically with clear headings, explicit mathematical formulas, and crisp technical descriptions. Word count (984 words) fits comfortably within the target bounds.

6 Gemini 3.5 Flash-Lite

Average (out of 10) 7.41

Smart Water-Meter Ingestion Architecture

1. Capacity Estimates and Arithmetic

To build a robust back-end for 1.2 million smart meters, we begin with deterministic capacity and storage sizing.

  • Steady-state readings per second: Each meter transmits one reading every 15 minutes (900 seconds). For 1,200,000 meters, the average ingestion rate is $1,200,000 / 900 = 1,333.33$ readings per second.
  • Raw data volume per day: At 1,333.33 readings per second, the total number of daily readings is $1,333.33 \times 86,400 = 115,200,000$ readings/day. With each reading sized at 200 bytes on the wire, the raw...
Show Full Answer ▼

Smart Water-Meter Ingestion Architecture

1. Capacity Estimates and Arithmetic

To build a robust back-end for 1.2 million smart meters, we begin with deterministic capacity and storage sizing.

  • Steady-state readings per second: Each meter transmits one reading every 15 minutes (900 seconds). For 1,200,000 meters, the average ingestion rate is $1,200,000 / 900 = 1,333.33$ readings per second.
  • Raw data volume per day: At 1,333.33 readings per second, the total number of daily readings is $1,333.33 \times 86,400 = 115,200,000$ readings/day. With each reading sized at 200 bytes on the wire, the raw daily data volume is $115,200,000 \times 200 \text{ bytes} = 23,040,000,000 \text{ bytes/day}$ (or 23.04 GB/day).
  • Raw storage for the full retention period including replication: The data must be retained for 400 days with 3 replicas. The total storage calculation is $23.04 \text{ GB/day} \times 400 \text{ days} \times 3 \text{ replicas} = 27,648 \text{ GB}$ (or 27.64 TB).

2. Ingestion Path and Reconnection Burst Sizing

When a major storm occurs, 30% of the meters ($360,000$ meters) lose connectivity for 6 hours. Over 6 hours, each disconnected meter buffers $6 \times 4 = 24$ readings. When connectivity returns, all 360,000 meters upload their 24 buffered readings evenly spread across a 10-minute (600-second) window.

  • Buffered upload rate: The rate of historical readings during the burst is $(360,000 \text{ meters} \times 24 \text{ readings}) / 600 \text{ seconds} = 8,640,000 / 600 = 14,400$ readings per second.
  • Concurrent live rate: Simultaneously, all 1,200,000 meters continue sending their normal live readings at $1,333.33$ readings per second.
  • Peak ingestion rate: The total peak rate is $14,400 + 1,333.33 = 15,733.33$ readings per second (roughly 15.7k rps).

To absorb this surge without dropping any readings, the ingestion layer uses a horizontally scalable, distributed message broker (such as Apache Kafka) partitioned into 64 partitions. An API Gateway fleet fronted by a load balancer terminates TLS, performs fast schema validation, and writes directly to the message broker. Because Kafka partitions decouple ingestion from downstream processing, the surge is safely buffered in disk-backed commit logs. The consumer workers scale dynamically based on consumer lag, handling the temporary surge without data loss.

3. Idempotency and Exactly-Once Billing

Meters retry uploads if they do not receive an acknowledgement within 30 seconds, which means duplicates are guaranteed to arrive. To guarantee that billing counts each (meter_id, interval_start) exactly once, we enforce idempotency within the Billing Stream Processor.

Each incoming reading payload contains a compound natural key: meter_id and interval_start. The billing stream processor consumes readings from the message broker and uses an atomic upsert operation against a distributed columnar data store or a deduplication state store (such as RocksDB integrated into Apache Flink).

When a reading arrives, the processor checks if a record for (meter_id, interval_start) has already been processed and billed. If the key exists, the duplicate payload is safely dropped or marked as a duplicate, ensuring zero double-counting. If the key does not exist, the billing table is updated and an acknowledgement is sent back to the ingestion broker.

4. Late-Arriving Data and Leak Alerts

Leak detection requires identifying when a meter shows non-zero flow in every one of 96 consecutive 15-minute intervals (covering a full 24-hour period), evaluated strictly by interval_start rather than arrival time. To ensure leak alerts remain correct when buffered readings arrive late and out of order, we employ Event-Time Stream Processing with Watermarking.

  • Handling late data: The stream processor maintains state windows keyed by meter_id. Because meters can buffer data for up to 48 hours, the stream processing windows are configured with a 48-hour allowed lateness threshold. This ensures that when delayed or reconnected batch uploads arrive, they are retroactively slotted into their correct chronological 15-minute bins based on their interval_start timestamps.
  • Missing intervals: If a 15-minute interval is entirely missing from the stream and its 48-hour lateness window closes without receiving data, that interval is explicitly treated as zero flow (or missing data that breaks a contiguous streak). A missing reading shatters the streak of non-zero flow, resetting the 96-interval consecutive counter for that meter.
  • Firing alerts: Once a meter accumulates 96 contiguous non-zero intervals, the system triggers exactly one alert per streak. Subsequent non-zero readings in the same continuous run do not generate duplicate alerts due to stateful deduplication flags stored alongside the active streak counter.

5. Architectural Trade-Offs

To finalize our system design, we evaluate three critical architectural choices:

  1. Ingestion Protocol: Chosen Option (HTTP/REST with JSON over TLS) vs. Rejected Option (MQTT / Custom TCP Sockets). While custom TCP sockets or MQTT provide lighter payload overhead, HTTP/REST with JSON is universally supported by cellular and IoT gateway modules, simplifies debugging, integrates natively with existing API management firewalls, and easily accommodates the 200-byte wire size requirement without specialized firmware protocol stacks.
  2. Storage Paradigm: Chosen Option (Object Storage Parquet Files for Cold Data + Distributed Log for Hot) vs. Rejected Option (Traditional Distributed Relational SQL Cluster). Maintaining 400 days of historical time-series data plus 3 replicas in a traditional relational database cluster introduces prohibitive infrastructure costs and complex horizontal sharding limits. By dumping compacted raw readings into columnar Parquet files on object storage (e.g., AWS S3) queried via serverless query engines, we achieve cost-effective long-term retention while keeping the active operational path fast.
  3. Dashboard Consistency: Chosen Option (Eventual Consistency via Read-Model Projections) vs. Rejected Option (Synchronous Read-Through Database Queries). To guarantee that dashboard queries remain responsive during massive reconnection bursts (15.7k rps), we chose asynchronous read-model projections that update customer dashboards within 5 minutes under normal loads (and relax to 60 minutes during storms). We rejected synchronous read-through queries because locking or querying the primary transactional store under peak ingestion bursts would cause cascading timeouts, database connection pool exhaustion, and potential ingestion failure.
Claude Opus 5.5 6.74

All the expected numbers are correct and shown: 1,333 readings/s, 23.04 GB/day, about 27.65 TB replicated, and a 15,733 readings/s burst that includes the steady load. Every required section is present and the answer is within the word limit. The weaknesses are depth and precision. The burst-absorption plan gives no backlog or retention sizing, does not separate upload requests from readings, and leaves out burst-time dashboard degradation. The acknowledgement path for exactly-once billing is muddled, with the ack going to the 'broker' rather than to the meter after a durable write. Some trade-offs are fairly generic.

Score by criterion

Architecture Quality

63

The flow is clear: an API gateway, a 64-partition Kafka cluster, a Flink billing processor deduplicating on (meter_id, interval_start) in a RocksDB state store or by upsert, and event-time leak detection with 48-hour allowed lateness. The enforcing component is named. However, the acknowledgement semantics are confused: the ack is 'sent back to the ingestion broker' rather than to the meter only after a durable write. The dedup state lifetime is not specified. The leak streak re-evaluation when a gap is filled late is described only loosely.

Completeness

75

All five requirements are addressed: the capacity arithmetic, the burst peak, the exactly-once billing component, the late-data leak handling with an explicit gap rule (a gap breaks the streak once the 48-hour lateness window closes), and three trade-offs. The answer is within the word range. Several items are thin, notably the burst-absorption details and the ack-after-durable-write guarantee.

Trade-off Reasoning

65

There are exactly three trade-offs, each naming a chosen and a rejected option. The dashboard read-model versus synchronous queries trade-off is tied to the burst and the 5/60-minute SLA. The HTTP versus MQTT and Parquet/object storage versus relational SQL trade-offs are fairly generic, and the HTTP reasoning about the 200-byte size is weak.

Scalability & Reliability

65

All expected values are correct, and the peak includes the steady load. Absorption is asserted only through Kafka disk buffering and consumer autoscaling. There is no backlog or retention sizing, no partition throughput check, no distinction between roughly 600 upload requests/s and readings/s, and no explicit dashboard degradation plan within the burst section. The no-loss guarantee via durable ack before the meter acknowledgement is not clearly stated.

Clarity

75

The answer is well organized, with headings matching the requirements and arithmetic laid out step by step. The wording is mostly precise. There is minor muddle in the missing-interval phrasing ('zero flow (or missing data...)') and in the ack description.

GPT-6.1 Sol 7.00

The answer gets the capacity and burst arithmetic right, stays within the word limit, and presents exactly three chosen-versus-rejected trade-offs. However, the burst buffering plan is not quantitatively sized, the billing design does not establish a crash-safe exactly-once guarantee, and the leak-alert logic does not fully explain late-data streak reconciliation.

Score by criterion

Architecture Quality

60

The broker-based ingestion path and billing natural key are appropriate. However, checking a deduplication store and updating billing are not explicitly one atomic, durable operation, so crashes could lose billing updates or double-count them. The acknowledgement described is to the broker, not a meter acknowledgement after durable ingestion. Event-time bins and a missing-interval rule are provided, but re-evaluation of historical streaks and alert identity when late readings join previously separate runs are underspecified.

Completeness

80

The 941-word answer covers all five requested areas, includes capacity arithmetic, explicitly adds live traffic to the burst, names the billing enforcement component, states a missing-interval rule, and gives exactly three trade-offs. Dashboard latency targets are also acknowledged. The coverage is structurally complete, although several guarantees are asserted rather than fully established.

Trade-off Reasoning

75

Exactly three trade-offs clearly identify chosen and rejected options, with useful connections to retention cost and burst-time dashboard isolation. The protocol comparison does not substantiate fitting JSON and HTTP into the given wire-size assumption, and the storage and dashboard comparisons overstate the inherent disadvantages of relational storage and synchronous queries. Costs of the chosen options receive limited attention.

Scalability & Reliability

65

The steady rate, daily volume, replicated retention storage, and approximately 15,733 readings/s burst are correctly calculated. However, 64 partitions and dynamic consumer scaling do not establish provisioned ingestion throughput or sufficient backlog capacity. There is no quantitative queue sizing, drain-time calculation, retry allowance, or explicit replicated-write acknowledgement policy. Buffered reading throughput is also not distinguished from upload request throughput.

Clarity

80

The answer is well organized, readable, and concise enough for the required range, with clearly displayed arithmetic and labeled trade-offs. Some technical descriptions remain ambiguous, notably the interchangeable billing-store alternatives and acknowledgements sent to the broker. Using 'rps' for readings rather than distinguishing requests also obscures ingestion sizing.

Gemini 3.8 Flash 8.49

The design thoroughly addresses all five prompt requirements with completely accurate mathematical calculations for both steady-state and burst scenarios. It provides sound architectural mechanisms for exactly-once billing deduplication and late-arriving event-time leak detection with an explicit gap-handling policy. The response falls slightly short of the 9.0+ threshold because it does not distinguish upload HTTP requests from individual reading throughput during reconnection bursts, nor does it quantify total queue backlog capacity.

Score by criterion

Architecture Quality

85

The architecture cleanly separates concerns across the ingestion gateway, Kafka commit logs, event-time stream processing, and billing stores. Exactly-once processing for billing correctly uses the composite key (meter_id, interval_start) in an atomic upsert/state store rather than relying solely on transport-level guarantees. The leak alert architecture correctly handles out-of-order data via event-time windowing and states a clear 48-hour lateness gap rule.

Completeness

88

All core checklist items are addressed: arithmetic is shown and correct, the burst is modeled with concurrent live traffic, deduplication responsibility is explicitly assigned, the missing interval behavior is clearly stated, and exactly three trade-offs with chosen/rejected options are provided. Word count (941 words) is well within the 800-1,100 word range.

Trade-off Reasoning

82

The response presents exactly three trade-offs, clearly identifying chosen and rejected alternatives with technical justifications. While the protocol and dashboard projection choices are well tied to the operational parameters, the storage trade-off leans somewhat generic (Parquet on object storage vs. relational SQL) rather than examining time-series specific alternatives (e.g., dedicated TSDB vs. LSM-tree stores).

Scalability & Reliability

83

All calculations match the expected values perfectly, including raw daily volume (23.04 GB/day), 400-day 3x replicated storage (27.65 TB), and the combined burst peak (15,733 rps). However, it does not distinguish upload request volume (e.g., ~600 requests/s if batched) from individual readings/s, and it discusses queue buffering qualitatively without explicitly calculating numeric backlog volume/disk footprint.

Clarity

88

The response is organized with clear markdown headings, concise explanations, and transparent mathematical formulations, making it easy to read and evaluate.

About this genre

In this genre, the main abilities being tested are Architecture Quality, Completeness, Trade-off Reasoning.

Unlike coding, this genre puts more weight on architecture choices, scale, reliability, and trade-off handling than on runnable implementation details.

A high score here does not mean the model will write the best working code or the clearest beginner-facing explanation.

Strong models here are useful for

architecture proposals, technical trade-offs, service design, and scaling discussions.

This genre alone cannot tell you

low-level implementation quality, exact correctness, or how well the model writes for a non-technical audience.

What Is Evaluated in System Design

Scoring criteria and weight used for this genre ranking.

Architecture Quality

30.0%

This criterion is included to check Architecture Quality in the answer. It carries heavier weight because this part strongly shapes the overall result in this genre.

Completeness

20.0%

This criterion is included to check Completeness in the answer. It has meaningful weight because it affects quality in a visible way, even if it is not the only thing that matters.

Trade-off Reasoning

20.0%

This criterion is included to check Trade-off Reasoning in the answer. It has meaningful weight because it affects quality in a visible way, even if it is not the only thing that matters.

Scalability & Reliability

20.0%

This criterion is included to check Scalability & Reliability in the answer. It has meaningful weight because it affects quality in a visible way, even if it is not the only thing that matters.

Clarity

10.0%

This criterion is included to check Clarity in the answer. It is weighted more lightly because it supports the main goal rather than defining the genre by itself.

Related Links

X f L