Skip to content

Commit a77a6d8

Browse files
authored
fix: typo, headings (#1738)
* fix: typo, headings
1 parent c7c776c commit a77a6d8

File tree

1 file changed

+17
-33
lines changed

1 file changed

+17
-33
lines changed

content/nginx/admin-guide/load-balancer/http-load-balancer.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ nd-content-type: how-to
99
nd-product: NGPLUS
1010
---
1111

12-
<span id="overview"></span>
13-
## Overview
12+
## Overview {#overview}
1413

1514
Load balancing across multiple application instances is a commonly used technique for optimizing resource utilization, maximizing throughput, reducing latency, and ensuring fault‑tolerant configurations.
1615

17-
Watch the [F5 NGINX Plus for Load Balancing and Scaling](https://www.nginx.com/resources/webinars/nginx-plus-for-load-balancing-30-min/) webinar, for a deep dive on techniques to build large‑scale, highly available web services.
18-
1916
NGINX and NGINX Plus can be used in different deployment scenarios as a [very efficient HTTP load balancer](https://www.nginx.com/blog/nginx-load-balance-deployment-models/).
2017

2118

22-
<span id="proxy_pass"></span>
23-
## Proxy HTTP Traffic to a Group of Servers
19+
## Proxy HTTP traffic to a group of servers {#proxy_pass}
2420

2521
Use NGINX Plus or NGINX Open Source to load balance across a group of servers. First, define the group of servers with the [`upstream`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) directive. Place the directive in the [`http`](https://nginx.org/en/docs/http/ngx_http_core_module.html#http) context.
2622

@@ -66,9 +62,7 @@ http {
6662
}
6763
```
6864

69-
70-
<span id="method"></span>
71-
## Choosing a Load Balancing Method
65+
## Choose a load balancing method {#method}
7266

7367
NGINX Open Source supports four load balancing methods: Round Robin, Least Connections, IP Hash, and Generic Hash.
7468
NGINX Plus supports six load balancing methods: the four above, Least Time, and Random.
@@ -161,9 +155,7 @@ If the `two` parameter is specified, NGINX first randomly selects two servers, t
161155
The **Random** load balancing method should be used for distributed environments where multiple load balancers are passing requests to the same set of backends. For environments where the load balancer has a full view of all requests, use other load balancing methods.
162156
163157
164-
165-
<span id="weights"></span>
166-
## Server Weights
158+
## Server weights {#weights}
167159
168160
Some load balancing methods, including Round Robin, Least Connections, and Random, distribute requests according to their server weights. The [`weight`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#weight) parameter to the [`server`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#server) directive sets the weight of a server. If no weight is set, it defaults to `1`:
169161
@@ -178,8 +170,7 @@ upstream backend {
178170
In the example above, **backend1.example.com** has weight `5`, while the other two servers have the default weight (`1`). However, the one with IP address `192.0.0.1` is marked as a `backup` server and does not receive requests unless both of the other servers are unavailable. With this configuration of weights, out of every `6` requests, `5` are sent to **backend1.example.com** and `1` to **backend2.example.com**.
179171

180172

181-
<span id="slow_start"></span>
182-
## Server Slow-Start
173+
## Server slow-start {#slow_start}
183174

184175
The server slow‑start feature prevents a recently recovered server from being overwhelmed by connections, which may time out and cause the server to be marked as failed again. This feature is only available in NGINX Plus.
185176

@@ -198,8 +189,7 @@ The time value (here, `30` seconds) sets the time during which NGINX Plus ramps
198189
> **Note:** If there is only a single server in a group, the [`max_fails`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_fails), [`fail_timeout`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#fail_timeout), and [`slow_start`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#slow_start) parameters to the `server` directive are ignored, and the server is never considered unavailable.
199190
200191

201-
<span id="sticky"></span>
202-
## Session Persistence
192+
## Session persistence {#sticky}
203193

204194
Session persistence means that NGINX Plus identifies user sessions and routes all requests in a given session to the same upstream server.
205195

@@ -270,14 +260,13 @@ NGINX Plus supports three session persistence methods. The methods are set with
270260
See [Runtime State Sharing in a Cluster]({{< ref "nginx/admin-guide/high-availability/zone_sync.md" >}}) for details.
271261
272262
273-
<span id="maxconns"></span>
274-
## Limit the Number of Connections
263+
## Limit the number of connections {#maxconns}
275264
276265
With NGINX Plus, it is possible to limit the number of active connections to an upstream server.
277266
278267
The [`max_conns`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_conns) parameter sets the maximum number of connections to the upstream server.
279268
280-
The [`queue`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#queue) directive allows excess connections to be held in a queue. It requires a maxmum number for the queue and a timeout.
269+
The [`queue`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#queue) directive allows excess connections to be held in a queue. It requires a maximum number for the queue and a timeout.
281270
282271
If the `max_conns` limit has been reached, the request is placed in a queue for further processing. If the queue limit has been reached, if no queue directive is specified, or if a client reaches the `timeout` time in queue, the client will receive an error.
283272
@@ -292,16 +281,14 @@ upstream backend {
292281
> **Note:** The `max_conns` limit is ignored if there are idle [`keepalive`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive) connections opened in other [`worker processes`](https://nginx.org/en/docs/ngx_core_module.html#worker_processes). As a result, the total number of connections to the server might exceed the `max_conns` value in a configuration where the memory is [shared with multiple worker processes](#zone).
293282
294283

295-
<span id="health"></span>
296-
## Configure Health Checks
284+
## Configure health checks {#health}
297285

298286
NGINX can continually test your HTTP upstream servers, avoid the servers that have failed, and gracefully add the recovered servers into the load‑balanced group.
299287

300288
See [HTTP Health Checks]({{< ref "nginx/admin-guide/load-balancer/http-health-check.md" >}}) for instructions how to configure health checks for HTTP.
301289

302290

303-
<span id="zone"></span>
304-
## Share Data with Multiple Worker Processes
291+
## Share data with multiple worker processes {#zone}
305292

306293
If an [`upstream`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) block does not include the [`zone`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone) directive, each worker process keeps its own copy of the server group configuration and maintains its own set of related counters. The counters include the current number of connections to each server in the group and the number of failed attempts to pass a request to a server. As a result, the server group configuration cannot be modified dynamically.
307294

@@ -314,8 +301,7 @@ For example, if the configuration of a group is not shared, each worker process
314301
Similarly, the [Least Connections](#method) load‑balancing method might not work as expected without the `zone` directive, at least under low load. This method passes a request to the server with the smallest number of active connections. If the configuration of the group is not shared, each worker process uses its own counter for the number of connections and might send a request to the same server that another worker process just sent a request to. However, you can increase the number of requests to reduce this effect. Under high load requests are distributed among worker processes evenly, and the `Least Connections` method works as expected.
315302

316303

317-
<span id="zone-size"></span>
318-
### Set the Zone Size
304+
### Set the zone size {#zone-size}
319305

320306
It is not possible to recommend an ideal memory‑zone size, because usage patterns vary widely. The required amount of memory is determined by which features (such as [session persistence](#sticky), [health checks](#health_active), or [DNS re‑resolving](#resolve)) are enabled and how the upstream servers are identified.
321307

@@ -326,8 +312,7 @@ As an example, with the `sticky_route` session persistence method and a single h
326312
- 12 servers (each defined as hostname:port pair where the hostname resolves to multiple IP addresses)
327313

328314

329-
<span id="resolve"></span>
330-
## Configure HTTP Load Balancing Using DNS
315+
## Configure HTTP load balancing using DNS {#resolve}
331316

332317
The configuration of a server group can be modified at runtime using DNS.
333318

@@ -361,13 +346,13 @@ The optional `ipv6=off` parameter means only IPv4 addresses are used for load ba
361346
If a domain name resolves to several IP addresses, the addresses are saved to the upstream configuration and load balanced. In our example, the servers are load balanced according to the [Least Connections](#method) load‑balancing method. If the list of IP addresses for a server has changed, NGINX Plus immediately starts load balancing across the new set of addresses.
362347

363348

364-
<span id="ntlm"></span>
365-
## Load Balancing of Microsoft Exchange Servers
349+
## Load balancing of Microsoft Exchange servers {#ntlm}
366350

367-
In [NGINX Plus Release 7](https://docs.nginx.com/nginx/releases/#nginxplus-release7-r7) and later, NGINX Plus can proxy Microsoft Exchange traffic to a server or a group of servers and load balance it.
351+
In [NGINX Plus Release 7]({{< ref "/nginx/releases.md#r7" >}}) and later, NGINX Plus can proxy Microsoft Exchange traffic to a server or a group of servers and load balance it.
368352

369353
To set up load balancing of Microsoft Exchange servers:
370354

355+
<span id="step1"></span>
371356
1. In a `location` block, configure proxying to the upstream group of Microsoft Exchange servers with the [`proxy_pass`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass) directive:
372357

373358
```nginx
@@ -388,7 +373,7 @@ To set up load balancing of Microsoft Exchange servers:
388373
}
389374
```
390375

391-
3. In the `http` block, configure a upstream group of Microsoft Exchange servers with an [`upstream`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) block named the same as the upstream group specified with the [`proxy_pass`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass) directive in Step 1. Then specify the [`ntlm`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ntlm) directive to allow the servers in the group to accept requests with NTLM authentication:
376+
3. In the `http` block, configure a upstream group of Microsoft Exchange servers with an [`upstream`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) block named the same as the upstream group specified with the [`proxy_pass`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass) directive in [Step 1](#step1). Then specify the [`ntlm`](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#ntlm) directive to allow the servers in the group to accept requests with NTLM authentication:
392377

393378
```nginx
394379
http {
@@ -448,7 +433,6 @@ http {
448433
For more information about configuring Microsoft Exchange and NGINX Plus, see the [Load Balancing Microsoft Exchange Servers with NGINX Plus]({{< ref "/nginx/deployment-guides/load-balance-third-party/microsoft-exchange.md" >}}) deployment guide.
449434

450435

451-
<span id="dynamic"></span>
452-
## Dynamic Configuration Using the NGINX Plus API
436+
## Dynamic configuration using the NGINX Plus API {#dynamic}
453437

454438
With NGINX Plus, the configuration of an upstream server group can be modified dynamically using the NGINX Plus API. A configuration command can be used to view all servers or a particular server in a group, modify parameter for a particular server, and add or remove servers. For more information and instructions, see [Configuring Dynamic Load Balancing with the NGINX Plus API]({{< ref "dynamic-configuration-api.md" >}}).

0 commit comments

Comments
 (0)