ScenarioProduction Scenarios
Design a high-throughput event ingestion pipeline with Kafka.
Reference answer
Architecture: 1) Producers: multiple instances, linger.ms=5, batch.size=256KB, compression=lz4, acks=1 (for telemetry) or acks=all (for critical). 2) Topics: partition count = 3×broker count, RF=3, large enough for peak throughput per partition (100MB/s guideline). 3) Brokers: dedicated I/O threads, NVMe SSDs, 10GbE networking, small JVM heap (6GB), lots of RAM for page cache. 4) Consumers: batch mode, max.poll.records=1000, parallel processing within consumer. 5) Monitoring: all JMX metrics + consumer lag alerts. 6) Back-pressure: buffer.memory sized for burst capacity. Result: can handle millions of events/second across 10-20 brokers.
Expected key concepts: linger.ms, batch.size, compression=lz4, acks, partition count, RF=3, NVMe, 10GbE, small JVM heap, page cache, max.poll.records, batch mode, millions events/second