dice-group / sask

Projectgroups Search and Extraction
GNU Affero General Public License v3.0
2 stars 10 forks source link

Intermittent error: Webclient using embedded Zuul, doesn't support dynamic refreshing of the microservices #42

Open guruprasads7 opened 6 years ago

guruprasads7 commented 6 years ago

In the webclient module, where we are using embedded Zuul to provide proxy services and dynamic routing of requests based on the request url, doesn't support the dynamic refreshing of the config to reflect the new microservices.

It's hard to recreate the issue, coz it happens intermittently.

But the issue can be re-created the issue: a) Start Eureka server instance b) Start the Webclient microservice. c) Start any other microservice (ex: chatbot)

In this case even though both the services are registered with Eureka, which can be found using http://localhost:1111/eureka/apps

Zuul throws an exception, saying the "client microservice cannot be found"

It's worth investigating, why we face this issue.

KHaack commented 6 years ago

Didnt get it. Is the dynamic refreshing not a main part of eureka?

guruprasads7 commented 6 years ago

Basically, the issue is sometimes we have is, Zuul doesn't refresh the microservices which were started later to it.

In this case, if one tries to access the newly added microservices, a Zuul forwarding exception occurs message Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: chatbot.

It needs a restart of the Webclient module which hosts the Zuul config, to reflect the new microservices and forward the requests to them.

KHaack commented 6 years ago

Ok thanks :) but I think with a bit time zuul get a refresh list or?

prasanthhs commented 6 years ago

Should be changed as per Issue #50 and change to using Feign Client instead of Embedded Zuul.