How to Explain It in an Interview
1. Goals and constraints
The normal production path is GPU event producers to regional Kafka, then Flink, Iceberg tables on object storage, Trino, and finally dashboards, analysts, and downstream data products. The fixed throughput is five million events per second with burst headroom, and dashboard queries must remain under five minutes. The same design must preserve correct results when events arrive late, are delivered more than once, or are replayed.
The likely first ingestion bottleneck is partition skew, not only total broker throughput. A few GPU identifiers can become disproportionately hot. The Kafka layer therefore uses many partitions and a salted partition expression, HASH(GPU_ID, SALT_BUCKET), to spread a single hot GPU across multiple partition buckets. Kafka retention is kept long enough for the required replay window instead of assuming an arbitrary fixed number of days.
2. Users and ownership
The producer boundary includes GPU servers used for training, GPU inference clusters, AI platforms and services, and other system, metric, or log sources. Producers own the meaning of their events and the fields needed for correct processing, including stable event identifiers, GPU identifiers, event timestamps, and compatible schemas.
The shared platform owns regional Kafka ingestion, Flink streaming execution, Iceberg storage, the Iceberg REST Catalog metadata and commit path, asynchronous compaction and snapshot maintenance, Trino serving, replay mechanics, cross-region recovery capability, workload isolation, and cost measurement.
Consumers are near-real-time dashboards, analysts using SQL, and applications or data products. The final diagram does not define a separate portal, CLI, API, or provisioning workflow, so I would not claim a self-service control plane that is not shown. Teams consume the reusable platform capabilities through the shared ingestion, table, catalog, and query boundaries visible in the architecture.
3. Data plane and metadata boundary
Production event records stay in the data plane. Kafka carries event records into Flink. Flink processes them and publishes transactional table changes into Iceberg-backed object storage. Trino reads those Iceberg tables and returns query results to consumers.
The Apache Iceberg REST Catalog is a metadata and commit service, not another production-record store. It maintains table metadata, atomic commit coordination, snapshots and time-travel information, schema evolution, partition evolution, namespaces, and the access-control information represented in the architecture. Flink and Trino use this metadata path to resolve and update table state. A catalog failure can block new commits or table discovery without turning catalog traffic into the event-data path.
4. Regional Kafka ingestion and hot-key control
Regional Kafka clusters absorb sustained traffic and bursts. The architecture uses many partitions to create parallel ingestion capacity. Each representative partition uses HASH(GPU_ID, SALT_BUCKET), which deliberately breaks the one-GPU-to-one-partition assumption for hot GPUs.
That improves load distribution, but it introduces a trade-off: downstream processing cannot depend on all records for one GPU being naturally serialized in a single Kafka partition. Any GPU-level aggregation that needs a unified result must merge the salted substreams correctly in Flink.
Kafka also retains the source event log for replay. Replay is a recovery or recomputation path, not the ordinary query path. Retention must therefore cover the operational replay requirement rather than being chosen only for storage convenience.
5. Flink event-time processing and exactly-once business results
Flink performs event-time processing and uses a two-hour watermark policy so events can arrive substantially later than their original event timestamp. The streaming logic deduplicates or upserts by event ID, which is essential when records are retried or replayed.
The diagram's exactly-once claim applies to the business-result boundary formed by Flink checkpointing plus transactional sink publication. It should not be interpreted as 'Kafka delivered every record exactly once.' Transport retries can still produce repeated input delivery. Correctness comes from recoverable Flink state, deterministic event handling, event-ID deduplication or upsert behavior, and transactional Iceberg publication.
Skew-aware key salting and rebalancing distribute work from hot GPUs across processing capacity. Operators observe consumer lag, checkpoint health, watermark progress, backpressure, state growth, restart activity, and sink commit failures to determine whether the stream is keeping up.
6. Transactional Iceberg storage
The lakehouse contains raw or detail GPU-event tables and dashboard aggregate tables. Physical Parquet files live in object storage. Apache Iceberg supplies the transactional table layer above those files.
The detail tables preserve GPU events and are partitioned by dimensions such as time and entity, matching the architecture. They retain the detailed history needed for SQL analysis, downstream products, validation, and replay reconciliation.
Dashboard aggregate tables contain pre-aggregated data intended for roughly one-to-five-minute query access. This prevents every dashboard refresh from scanning the complete raw history. The trade-off is additional streaming compute and storage in exchange for lower query work and more predictable freshness.
Iceberg snapshots provide an atomic publication boundary for readers. Schema evolution and partition evolution are controlled through table metadata, allowing the platform to change logical schema or physical organization without treating every compatible change as a full table replacement.
7. Metadata and commit service
The Iceberg REST Catalog coordinates table metadata and commits between engines. It records logical table state separately from the Parquet production records stored in object storage.
This boundary matters because multiple engines must agree on the current table snapshot. Flink uses it while publishing table updates, and Trino uses it while resolving tables and snapshots for reads. Atomic metadata publication prevents consumers from observing a partially published table state.
A catalog or commit-service outage mainly affects new table commits and table discovery. Recovery must restore or fail over catalog metadata consistently with the corresponding object-storage state before writers and readers resume normal operation.
8. Asynchronous compaction and maintenance
High-rate streaming writes can create many small files. The separate Compaction & Maintenance service rewrites small files and expires snapshots asynchronously. Its work is intentionally non-blocking relative to the latency-critical streaming path.
Running compaction inline with every streaming commit would couple ingest latency to file-rewrite throughput. Separating it keeps ingestion responsive, but it creates another operational queue that must be measured. Operators should track file counts, file sizes, snapshot growth, maintenance backlog, object-store requests, and compaction compute.
If compaction falls behind, ingestion can continue, but query efficiency may gradually degrade because Trino must open and scan a less efficient file layout. The recovery action is to restore maintenance capacity and reduce backlog rather than stopping the production event stream unnecessarily.
9. Trino serving and workload isolation
Trino serves SQL over the Iceberg tables. The architecture separates high-priority dashboard queries from ad-hoc and backfill queries using distinct workload queues or resource groups.
This isolation protects the under-five-minute dashboard objective from large historical scans. When capacity is constrained, lower-priority ad-hoc or backfill work can wait while dashboard queries receive the preferred share of query resources.
The important operational signals are dashboard and backfill queue depth, query latency, CPU consumption, scan bytes, concurrency, and failures. Workload isolation does not eliminate shared-resource limits, so admission control and queueing remain necessary when total demand exceeds available capacity.
10. Consumer interfaces
Near-real-time dashboards read the pre-aggregated tables through Trino. Analysts use SQL for interactive investigation. Applications and downstream data products can also consume governed lakehouse tables or query results through the same serving boundary represented in the architecture.
The platform does not invent an additional cache, API service, warehouse, or serving database. The selected design deliberately keeps the consumer path on Trino and Iceberg so that the written answer remains consistent with the approved diagram.
Consumer-visible freshness depends on several boundaries working together: Kafka lag, Flink watermark and checkpoint progress, successful Iceberg commits, aggregate-table updates, table maintenance, and Trino queue latency. A stale dashboard therefore needs diagnosis across those boundaries rather than being treated as only a query-engine problem.
11. Replay and reconciliation
Replay begins from retained Kafka data and feeds records back into Flink. It is used after processing corrections, recovery, or controlled recomputation. Because replayed input may contain events already represented in Iceberg, the event ID remains the business deduplication key.
Flink restores processing state or reprocesses retained events, and transactional Iceberg publication prevents partially committed table changes from becoming visible. Operators reconcile event counts, commit state, late-event behavior, raw-table results, and dashboard aggregates before declaring the replay complete.
Replay is different from retry. A retry repeats a failed operation near its original boundary. Replay intentionally reprocesses a retained range of historical events. It is also different from disaster-recovery failover, which moves service execution to the secondary-region capacity.
12. Cross-region disaster recovery
The disaster-recovery design replicates object storage and catalog metadata to a secondary region. It also maintains standby Kafka, Flink, and Trino capacity. During a regional failure, the platform can fail over to the standby services or replay from retained Kafka or durable object-storage data when required.
Recovery order is important. The secondary region first needs consistent durable table data and catalog metadata. The ingestion and streaming boundary can then restore state or replay retained events. Trino should resume serving after the recovered catalog and table snapshots are usable.
The design does not invent an RPO or RTO. Those objectives must come from the business. They determine how much data replication, metadata protection, Kafka retention, and standby compute capacity the platform should pay for.
13. Cost measurement at sustained and burst load
Cost is measured at the same boundaries that scale. In ingestion, meter events and bytes entering Kafka and the retention footprint. In streaming, measure Flink compute. In storage, measure object-store bytes and requests. Measure compaction compute separately because maintenance can rise after a burst. In serving, measure Trino CPU and scan bytes.
The architecture also tracks cost by tenant, workload, and environment where those attribution dimensions exist. That makes burst behavior visible. A traffic spike can raise Kafka, Flink, object-store, compaction, and later query costs at different times rather than producing one unexplained platform total.
The major cost trade-offs are explicit. More Kafka partitions and Flink capacity improve throughput headroom. Dashboard aggregates spend extra compute and storage to reduce repeated scans. Continuous compaction spends background compute to protect query efficiency. Workload isolation reserves capacity for important queries. Cross-region standby services improve recovery readiness but add capacity cost even while the primary region is healthy.
14. Reliability and failure handling
Kafka failures are observed through broker health, partition availability, consumer lag, and retention pressure. Flink failures are observed through checkpoint failures, restart activity, backpressure, watermark delay, and state growth. Iceberg and catalog failures appear as commit errors, metadata access problems, or snapshot-publication failures. Trino failures appear through queue growth, query errors, latency, CPU pressure, and scan volume.
The blast radius should follow the failing component. A streaming-job problem does not automatically make historical Iceberg data unavailable. A compaction backlog does not necessarily stop ingestion. A Trino saturation event should not corrupt streaming publication. A producer publishing bad event semantics is a data-product defect rather than proof that the shared platform itself is down.
After recovery, the platform validates committed snapshots, record counts, replay boundaries, late-event processing, aggregate results, query availability, and cost signals before returning to normal operation.
15. Schema evolution and controlled change
Schema evolution is handled through Iceberg metadata and producer compatibility rules. Partition evolution allows the physical organization of a table to change as query and data patterns change.
The architecture does not define a separate deployment portal or migration service, so I would not invent one. For a breaking data change, I would use the capabilities already present: publish the new schema or table state, use replay or backfill where historical data must be regenerated, reconcile old and new results, move consumers, and then retire the old representation after validation.
This avoids an all-at-once rewrite while staying inside the diagram's Kafka, Flink, Iceberg, catalog, replay, and query boundaries.
16. Final trade-offs
Salted Kafka partitioning reduces hot-key concentration but makes GPU-level aggregation more complex. A two-hour event-time window improves late-data correctness but increases streaming state and recovery work. Pre-aggregated dashboard tables improve query freshness but consume additional streaming compute and storage. Object storage keeps durable history economical relative to a dedicated high-performance copy, but streaming small files require compaction.
Separate Trino queues protect dashboards but can increase waiting time for ad-hoc and backfill work. Asynchronous compaction protects the ingest path but can temporarily allow less efficient file layouts. Cross-region standby capacity improves disaster recovery but increases steady-state cost. The design is therefore intentionally balanced around correctness and predictable freshness rather than minimizing every infrastructure component.