-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The usage of preCreateConnections method of AbstractConnectionPool #6512
Comments
I would think the Like you see in the test cases - https://github.com/eclipse/jetty.project/blob/jetty-9.4.43.v20210629/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java#L1866-L1873 |
Method You have to tell Use |
Thanks to both of you! Great answers! |
The suggested approach works like a charm, let me close the ticket and thanks again for the help! |
Jetty version
org.eclipse.jetty:jetty-client:9.4.36.v20210114
Java version
openjdk version "11.0.2" 2019-01-15
Question
Hi people,
I have an application which uses Jetty client to communicate with a bunch of other systems. The first request or a few concurrent requests to the application normally get slow response since it takes time to create connections toward other systems, especially the SSL handshakes.
I have an idea to invoke
preCreateConnections
method ofAbstractConnectionPool
class during application startup phase in order to pre-create a number of connections which are warmed up already before application start to serve any incoming request. However, I did some experiments and realize the connections can only be created when httpclient sending the first request. My question is if there is a way to achieve my goal that is described above or there must be a first request to trigger the precreation of connections. Thanks!Below is the code snippet that shows the usage of
preCreateConnections
The text was updated successfully, but these errors were encountered: