Closed stewartboyd119 closed 8 months ago
Hi, this behaviour is rather anomalous. I can't reproduce it with the same settings, the break up into 2 packets happens at very high message sizes, ~30K bytes, in the latest v2.1.1.
Do you see similar behaviour locally, too @stewartboyd119 , or does it happen only on your datacenter machines?
I suspect there might be some network setting external to this library which might cause this, but then it should probably happen for sarama as well.
Does the same behaviour happen when socket.send.buffer.bytes is not set (and left with default value 0)?
Could you share pcaps or similar which we can look at? As well as debug logs for the application, setting "debug" key in the config to "broker".
Closing this - please reopen with the additional information attached and if this still persists. Thanks!
Description
When producing messages using confluent-kafka-go, I've noticed that if my message's value (with no key and no headers) is 72 bytes and smaller that it is sent as 1 tcp packet to the broker. Above this it will be 2 or more. I don't see a similar behavior in the sarama library. This manifests as larger latencies. When my producer is deployed to our datacenter and communicates with the kafka broker in our datacenter, the 73 bytes message can take 40 ms to be acked as produced by the broker. The 72 byte message takes single milliseconds.
I'm looking for guidance, on why this split my be happening. Is it something in my control (by of config options), and why the sarama producer wouldn't see the same type of packet split.
How to reproduce
Produce a 72 byte message (or 73 byte message with the following snippet) and then monitor outgoing traffic to broker using wireShark (or any network packet inspector).
Checklist
Please provide the following information:
LibraryVersion()
): v2.0.2[X] Client configuration: `ConfigMap{ &kafka.ConfigMap{ "bootstrap.servers": bootstrapServers, "client.id": uuid.NewString(), "sasl.username": s.kConfig.SaslUsername, "sasl.password": s.kConfig.SaslPassword, "security.protocol": "SASL_SSL", "sasl.mechanism": "SCRAM-SHA-256", "linger.ms": 0, "batch.num.messages": 1, "socket.send.buffer.bytes": 1000, "socket.keepalive.enable": true, "acks": "all", "enable.idempotence": "true", }
}`
"debug": ".."
as necessary)