Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion content/ngf/overview/nginx-plus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
11 changes: 5 additions & 6 deletions content/ngf/traffic-management/upstream-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -421,15 +420,15 @@ You should see the `zone` directive in the `coffee` and `tea` upstreams both spe

```text
upstream default_coffee_80 {
random two least_conn;
random two least_time header;
zone default_coffee_80 1m;

server 10.244.0.14:8080;
keepAlive 16;
}

upstream default_tea_80 {
random two least_conn;
random two least_time header;
zone default_tea_80 1m;

server 10.244.0.15:8080;
Expand Down Expand Up @@ -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;
random two least_time header;
zone default_coffee_80 1m;

server 10.244.0.14:8080;
Expand Down Expand Up @@ -558,7 +557,7 @@ kubectl exec -it deployments/gateway-nginx -- nginx -T

```text
upstream default_tea_80 {
random two least_conn;
random two least_time header;
zone default_tea_80 1m;

server 10.244.0.15:8080;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down
Loading