Skip to content
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

How can we make Zuul view of data/dynamic properties from archaius and server list consistant ? #1585

Open
rajc28 opened this issue May 24, 2023 · 0 comments

Comments

@rajc28
Copy link

rajc28 commented May 24, 2023

We are using using Zuul 2.3 as API-Gateway and Archaius as configuration library for accessing dynamic configuration, all the ribbon properties are updated in to Archaius for every x sec , endpoint/host details of upstream is loaded using <vip>.ribbon.listOfServers ribbon property which will be read by implementation of AbstractServerList<DiscoveryEnabledServer> which in turn will be referred by loadbalancer, server list data is refreshed periodically from archaius in a refresh thread for each Origin.

So, the issue is because of an addition polling (other than archaius polling) which DynamicServerListLoadBalancer does to get the updated server list Ref: https://github.com/Netflix/ribbon/blob/master/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/DynamicServerListLoadBalancer.java#L60-L61.

Example:
Initially API /cat/dog is configured to go to host1, later if we update config to add prefix /test and endpoint to be host2. As the data is reflected in archaius and loadbalancer referencing server list(which in turn gets it from archaius) at different times, request is being routed to old host host1 by adding prefix /test until load balancer is updated with new server list.

How we can create our own AbstractServerList that will get updated at the same time that we read the Archaius configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant