Skip to content

Conversation

@sdelicata
Copy link
Contributor

What does this PR do?

Adds a new leasttime load balancing strategy that selects backend servers based on average response time (TTFB) and active connection count, weighted by server capacity.

Motivation

Traefik's existing strategies (WRR, P2C, HRW) don't consider response time/latency as a selection criterion.
The leasttime strategy routes traffic to the fastest-responding servers while maintaining fair load distribution.
It is particularly interesting when:

  • Backend servers have heterogeneous performance (different hardware, locations, or load)
  • Servers experience performance degradation (sustained load, network latency changes)
  • Multi-datacenter deployments with varying RTT

More

  • Added/updated tests
  • Added/updated documentation

@rtribotte rtribotte added this to the next milestone Oct 20, 2025
@rtribotte rtribotte force-pushed the feat/least-time-load-balancing branch from 60c9489 to 6cde5ba Compare October 22, 2025 12:46
@kevinpollet kevinpollet changed the title feat: least time load balancing strategy Add least time load balancing strategy Oct 22, 2025
Copy link
Member

@rtribotte rtribotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker
Copy link
Contributor

🚫 checks status: PR status: cancelled

@traefiker
Copy link
Contributor

🚫 checks status: PR status: cancelled

@rtribotte rtribotte force-pushed the feat/least-time-load-balancing branch from 6efb9d0 to 1b42eaa Compare October 23, 2025 13:53
@traefiker traefiker merged commit a754236 into traefik:master Oct 23, 2025
59 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants