Skip to content

Session-Based Sticky Load Balancing for Spring Cloud Gateway #4232

Description

@Gebreyesus

Summary for the Spring Cloud Gateway proposal

The gap worth raising upstream: Spring Cloud Gateway's default load-balancer filter doesn't pass enough per-request context (or provide a per-route hook) for a custom ReactorServiceInstanceLoadBalancer to implement session-based sticky routing, forcing consumers to fully replace the default filter just to get access to the ServerWebExchange/session on a per-route basis. The built-in RequestBasedStickySessionServiceInstanceListSupplier solves a similar problem but only for cookie-based affinity applied uniformly to a service, not for gateway-session-based affinity that can be toggled per route.

A useful ask for the issue: expose a supported extension point (or request context type) in the default gateway load-balancer filter that lets a custom ReactorServiceInstanceLoadBalancer access the ServerWebExchange/session per-route, without requiring downstream consumers to disable and reimplement the entire filter. Prior related discussion: spring-cloud/spring-cloud-commons#764 and #1176.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions