Batching (सन्देशहरूलाई समूह गर्ने) र compression (डेटा सङ्कुचित गर्ने) उच्च Kafka throughput का लागि मुख्य प्रविधिहरू हुन् — प्रति-सन्देश ओभरहेड र नेटवर्क/भण्डारण लागतहरू कम गरेर। तिनीहरूलाई बुझ्नु Kafka को उच्च कार्यक्षमता हासिल गर्न मदद गर्छ।
Batching — सन्देशहरूलाई समूह गर्नुहोस्
BATCHING → the producer groups multiple messages into a single BATCH before sending:
→ fewer, larger requests instead of many tiny ones → much higher THROUGHPUT (less
per-request overhead, fewer network round-trips)
→ controlled by: batch.size (batch size limit) + linger.ms (wait time to accumulate a batch)
→ trade-off: slightly higher LATENCY (waiting to batch) for much higher throughput
→ batching is essential for high-throughput producing
