-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Eagerly create RibbonClients #1334
Comments
@KamikaZeeFu not currently. In fact, we've had problems when feign clients (similar to ribbon clients) get eagerly created. Besides the first request is slow, are you experiencing problems? |
@spencergibb Problem is not the lazy initialization, but the fact that the creation of client is not synchronized. |
And what problems does that cause @jansyk13? |
@spencergibb well the main problem is that it creates unpredictable delays. Of course I could just increase my timeouts, but that is rather unsatisfying. |
It would likely be feasible to eagerly create the zuul ribbon clients since we know all of the routes ahead of time. |
In the meantime, you could use something like this to create the clients when the proxy boots, we use that to refresh them if we ever change the read/connect timeout values in archaius :
|
Upstream issue: spring-cloud/spring-cloud-commons#184 |
…ed client contexts
GH-1334: Support for eagerly initializing zuul Ribbon contexts
Closed via 5bf87c4 |
From what I've understood, each Ribbon Client created by Spring basically gets it's own ApplicationContext.
This context is created when the client is first used, which makes the very first request rather slow.
Is it possible to eagerly create these clients/contexts?
The text was updated successfully, but these errors were encountered: