Kafka - Performance TuningYou want to reduce network usage but keep latency low in Kafka producer. Which tuning approach is best?ASet batch.size to 64 KB, compression.type to 'none', and linger.ms to 100 ms.BSet batch.size to 16 KB, compression.type to 'zstd', and linger.ms to 5 ms.CSet batch.size to 1 KB, compression.type to 'gzip', and linger.ms to 0 ms.DSet batch.size to 0, compression.type to 'snappy', and linger.ms to 0 ms.Check Answer
Step-by-Step SolutionSolution:Step 1: Balance batch size and linger.ms16 KB batch size with 5 ms linger.ms allows small batches with slight delay to improve compression and reduce network calls.Step 2: Choose compression codeczstd provides good compression ratio with reasonable speed, reducing network usage effectively.Final Answer:Set batch.size to 16 KB, compression.type to 'zstd', and linger.ms to 5 ms. -> Option BQuick Check:Moderate batch + fast compression + small linger = low network, low latency [OK]Quick Trick: Small linger + moderate batch + good compression saves bandwidth [OK]Common Mistakes:Using large linger.ms causing high latencyDisabling compression to save latencySetting batch.size too small to compress effectively
Master "Performance Tuning" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Advanced Stream Processing - Why advanced patterns handle complex flows - Quiz 8hard Advanced Stream Processing - Why advanced patterns handle complex flows - Quiz 4medium Event-Driven Architecture - Event choreography vs orchestration - Quiz 13medium Kubernetes and Cloud Deployment - Confluent Cloud overview - Quiz 10hard Kubernetes and Cloud Deployment - Resource planning and capacity - Quiz 13medium Kubernetes and Cloud Deployment - Auto-scaling strategies - Quiz 8hard Multi-Datacenter and Replication - Geo-replication strategies - Quiz 5medium Performance Tuning - Disk I/O optimization - Quiz 15hard Performance Tuning - Partition count strategy - Quiz 14medium Security - Why securing Kafka protects data - Quiz 4medium