You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Motivation
The Pulsar Admin client uses connection pooling (keep alive) without limiting the number of connections.
When HTTP calls get queued up on the brokers for some reason, the client will keep on opening more connections.
Solution
The AsyncHttpClient used in pulsar-admin-client should be configured to limit the number of connections.
This could happen somewhere here:
setMaxConnections and setMaxConnectionsPerHost would have to be configured.
In addition, it would be useful to use setPooledConnectionIdleTimeout to set the timeout to 25 seconds so that pooled connections don't exceed timeouts in typical firewall configurations. The default of 60 seconds conflicts with many firewall idle connection defaults.
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
I'm willing to submit a PR!
The text was updated successfully, but these errors were encountered:
lhotari
changed the title
Add HTTP connection pooling for Pulsar Admin client
Set limits for number of opened HTTP connections for Pulsar Admin client
Feb 12, 2024
Search before asking
Motivation
The Pulsar Admin client uses connection pooling (keep alive) without limiting the number of connections.
When HTTP calls get queued up on the brokers for some reason, the client will keep on opening more connections.
Solution
The AsyncHttpClient used in pulsar-admin-client should be configured to limit the number of connections.
This could happen somewhere here:
pulsar/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/http/AsyncHttpConnector.java
Lines 99 to 108 in e3debb9
setMaxConnections
andsetMaxConnectionsPerHost
would have to be configured.In addition, it would be useful to use
setPooledConnectionIdleTimeout
to set the timeout to 25 seconds so that pooled connections don't exceed timeouts in typical firewall configurations. The default of 60 seconds conflicts with many firewall idle connection defaults.Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: