From 9f178e3dfd61c2d5745a7da9f6be25e9b1f96c7f Mon Sep 17 00:00:00 2001 From: Yogarajalakshmi S Date: Thu, 4 Jun 2026 11:49:22 -0400 Subject: [PATCH] update least_time LB method availability for NGINX OSS --- content/ngf/overview/nginx-plus.md | 1 - content/ngf/traffic-management/upstream-settings.md | 11 +++++------ .../admin-guide/load-balancer/http-load-balancer.md | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/content/ngf/overview/nginx-plus.md b/content/ngf/overview/nginx-plus.md index 100994f5d..f6ae5a385 100644 --- a/content/ngf/overview/nginx-plus.md +++ b/content/ngf/overview/nginx-plus.md @@ -14,7 +14,6 @@ NGINX Gateway Fabric can use NGINX Open Source or NGINX Plus as its data plane. - **Live activity monitoring**: The [NGINX Plus dashboard]({{< ref "/ngf/monitoring/dashboard.md" >}}) shows real-time metrics and information about your server infrastructure. - **Dynamic upstream configuration**: NGINX Plus can dynamically reconfigure upstream servers when applications in Kubernetes scale up and down, preventing the need for an NGINX reload. - **Session persistence**: NGINX Plus provides support for cookie-based session persistence, allowing client requests to be consistently routed to the same upstream pod. -- **Load balancing methods**: NGINX Plus provides advanced, latency-aware load balancing methods (such as `least_time` and `least_time last_byte inflight`) that route traffic based on time to first byte or full response, optionally factoring in in-flight requests for smarter upstream selection. - **JWT and OIDC Authentication**: [JSON Web Token (JWT)]({{< ref "/ngf/traffic-security/jwt-authentication.md" >}}) and [OpenID Connect (OIDC)]({{< ref "/ngf/traffic-security/oidc-authentication.md" >}}) authentication support for access control and auth delegation. - **Web Application Firewall**: NGINX Plus enables integration with [F5 WAF for NGINX]({{< ref "/ngf/waf-integration/overview.md" >}}) (separate add-on subscription), providing enterprise-grade protection against web exploits, injection attacks, and other OWASP Top 10 threats. WAF policies are applied at the Gateway or Route level using the `WAFPolicy` custom resource. - **Support**: With an NGINX Plus license, you can take advantage of full [support](https://my.f5.com/manage/s/article/K000140156/) from NGINX, Inc. diff --git a/content/ngf/traffic-management/upstream-settings.md b/content/ngf/traffic-management/upstream-settings.md index 23c53b567..24cc0d253 100644 --- a/content/ngf/traffic-management/upstream-settings.md +++ b/content/ngf/traffic-management/upstream-settings.md @@ -356,8 +356,7 @@ upstream default_tea_80 { ``` {{< call-out "note" >}} -NGINX Open Source supports the following load-balancing methods: `round_robin`, `least_conn`, `ip_hash`, `hash`, `hash consistent`, `random`, `random two`, and `random two least_conn`. -NGINX Plus supports all of the methods available in NGINX Open Source, and adds the following methods: `random two least_time=header`, `random two least_time=last_byte`, `least_time header`, `least_time last_byte`, `least_time header inflight`, and `least_time last_byte inflight`. +NGINX Open Source supports the following load-balancing methods: `round_robin`, `least_conn`, `ip_hash`, `hash`, `hash consistent`, `random`, `random two`, `random two least_conn`, `random two least_time=header`, `random two least_time=last_byte`, `least_time header`, `least_time last_byte`, `least_time header inflight`, and `least_time last_byte inflight`. {{< /call-out >}} ## Configure upstream zone size @@ -421,7 +420,7 @@ You should see the `zone` directive in the `coffee` and `tea` upstreams both spe ```text upstream default_coffee_80 { - random two least_conn; + least_time header; zone default_coffee_80 1m; server 10.244.0.14:8080; @@ -429,7 +428,7 @@ upstream default_coffee_80 { } upstream default_tea_80 { - random two least_conn; + least_time header; zone default_tea_80 1m; server 10.244.0.15:8080; @@ -498,7 +497,7 @@ You should see that the `coffee` upstream has the `keepalive` directive set to 3 ```text upstream default_coffee_80 { - random two least_conn; + least_time header; zone default_coffee_80 1m; server 10.244.0.14:8080; @@ -558,7 +557,7 @@ kubectl exec -it deployments/gateway-nginx -- nginx -T ```text upstream default_tea_80 { - random two least_conn; + least_time header; zone default_tea_80 1m; server 10.244.0.15:8080; diff --git a/content/nginx/admin-guide/load-balancer/http-load-balancer.md b/content/nginx/admin-guide/load-balancer/http-load-balancer.md index ece301773..bdda5e874 100644 --- a/content/nginx/admin-guide/load-balancer/http-load-balancer.md +++ b/content/nginx/admin-guide/load-balancer/http-load-balancer.md @@ -65,7 +65,7 @@ http { ## Choose a load balancing method {#method} NGINX Open Source supports four load balancing methods: Round Robin, Least Connections, IP Hash, and Generic Hash. -NGINX Plus supports six load balancing methods: the four above, Least Time, and Random. +NGINX and NGINX Plus supports six load balancing methods: the four above, Least Time, and Random. > **Note:** When configuring any method other than Round Robin, put the corresponding directive ([`hash`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash), [`ip_hash`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ip_hash), [`least_conn`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_conn), [`least_time`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time), or [`random`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#random)) above the list of `server` directives in the [`upstream {}`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) block. @@ -121,7 +121,7 @@ NGINX Plus supports six load balancing methods: the four above, Least Time, and The optional [consistent](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash) parameter to the `hash` directive enables [ketama](http://www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_-_a_consistent_hashing_algo_for_memcache_clients) consistent‑hash load balancing. Requests are evenly distributed across all upstream servers based on the user‑defined hashed key value. If an upstream server is added to or removed from an upstream group, only a few keys are remapped, which minimizes cache misses. This is useful for load balancing cache servers or other applications that accumulate state. -5. [Least Time](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time) (NGINX Plus only) – For each request, NGINX Plus selects the server with the lowest average latency and the lowest number of active connections. The lowest average latency is calculated based the [parameter](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time) included with the `least_time` directive. This parameter can be one of the following: +5. [Least Time](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time) – For each request, NGINX selects the server with the lowest average latency and the lowest number of active connections. The lowest average latency is calculated based the [parameter](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#least_time) included with the `least_time` directive. This parameter can be one of the following: - `header` – Time to receive the first byte from the server - `last_byte` – Time to receive the full response from the server @@ -139,8 +139,8 @@ NGINX Plus supports six load balancing methods: the four above, Least Time, and If the `two` parameter is specified, NGINX first randomly selects two servers, then chooses between these servers using one of the following specified methods: - `least_conn` – The least number of active connections - - `least_time=header` (NGINX Plus) – The least average time to receive the response header from the server ([`$upstream_header_time`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_header_time)) - - `least_time=last_byte` (NGINX Plus) – The least average time to receive the full response from the server ([`$upstream_response_time`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_response_time)) + - `least_time=header` – The least average time to receive the response header + - `least_time=last_byte` – The least average time to receive the full response ```nginx upstream backend {