Skip to content

Conversation

@lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Feb 11, 2026

Motivation

All MeshExternalService endpoints currently have equal priority - there's no way to express that traffic should prefer one endpoint and failover to another when the primary becomes unhealthy.

Implementation information

Add an optional priority field to MeshExternalService.Endpoint that maps directly to https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/priority. Lower values = higher priority, 0 is the default.

endpoints:
    - address: primary.us-east-2.com
      port: 5432
      priority: 0
    - address: secondary.us-west-2.com
      port: 5432
      priority: 1

Changes:

  • Added Priority *uint32 field to Endpoint struct
  • Updated createMeshExternalServiceEndpoint() to always set Locality.Priority from the endpoint priority (defaults to 0)
  • Removed unused zone parameter from createMeshExternalServiceEndpoint since MES endpoints don't use zone-based locality
  • Added validator and topology tests covering priority-based failover

Supporting documentation

Fix #https://github.com/Kong/kong-mesh/issues/9123

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

Successfully merging this pull request may close these issues.

1 participant