ব্যাচিং (বার্তা গ্রুপিং) এবং কম্প্রেশন (ডেটা সংকোচন) উচ্চ Kafka থ্রুপুটের জন্য মূল কৌশল — প্রতিটি বার্তার ওভারহেড এবং নেটওয়ার্ক/স্টোরেজ খরচ হ্রাস করে। এগুলি বোঝা Kafka-এর উচ্চ কর্মক্ষমতা অর্জনে সাহায্য করে।
ব্যাচিং — বার্তা গ্রুপ করুন
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
