Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Conversation

@geofffranks
Copy link
Contributor

@geofffranks geofffranks commented Apr 14, 2022

This provides a solution to issues where stale routes containing out of date/failing route-service
information are never detected, and ended up causing errors for all app
instances, when the stale route was at index 0 of an endpoint pool.

This was previously fixed with #298, but
that caused issues with loadbalancing fairness, and sticky sessions.

Instead of pruning the endpoint with the failing route-service, to force
it to be re-registered with an up-to-date route-service, gorouter now
treats the route-service as an endpoint-pool property, and updates the
route-service whenever a new registration occurs.

Pruning endpoints when route-services fail has a few unfortunate
side-effects:
- there are load-balancing issues during the time of a pruned route
  which result in not all active apps receiving their share of traffic
  (cloudfoundry/routing-release#262)
- apps relying on sticky-sessions + route-services that return 401/403s
  to clients as part of an auth flow end up breaking the sticky session

This reverts commit 039ab0c.
This provides a solution to issues where stale routes containing out of date/failing route-service
information are never detected, and ended up causing errors for all app
instances, when the stale route was at index 0 of an endpoint pool.

This was previously fixed with #298, but
that caused issues with loadbalancing fairness, and sticky sessions.

Instead of pruning the endpoint with the failing route-service, to force
it to be re-registered with an up-to-date route-service, gorouter now
treats the route-service as an endpoint-pool property, and updates the
route-service whenever a new registration occurs.

Also adds integration tests to ensure we didn't regress on the behavior
resolved in #298.

Signed-off-by: Amelia Downs <adowns@vmware.com>
@mariash mariash self-requested a review April 18, 2022 18:40
@geofffranks geofffranks merged commit 9b45f2e into main Apr 18, 2022
@geofffranks geofffranks deleted the route-service-pruning-fix branch April 18, 2022 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants