Opening new connections is quite expensive on kafka, not only do we have to reperform authentication, the new transform instance created for this new connection must fetch its own metadata from kafka.
To give visibility into this I have added this connections_opened metric which increments every time a new connection is opened.
The results of this metric on the windsock benchmark:
We can see that
we initially create 4 connections, presumably 2 for the producer and 2 for the consumer.
after that no more connections are created
So we can conclude that the performance issues is not caused by the client creating more connections.
I believe this metric should still be added as its helpful for ruling out such possibilities in the future.
Opening new connections is quite expensive on kafka, not only do we have to reperform authentication, the new transform instance created for this new connection must fetch its own metadata from kafka. To give visibility into this I have added this
connections_opened
metric which increments every time a new connection is opened.The results of this metric on the windsock benchmark:
We can see that
So we can conclude that the performance issues is not caused by the client creating more connections. I believe this metric should still be added as its helpful for ruling out such possibilities in the future.