mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
Add load balancing and http3 to docs
parent
34a28cb40b
commit
52a2635eb5
@ -740,7 +740,8 @@ A map of server ID (of your choice) to its configuration object. Each server is
|
||||
"tls_connection_policies": [],
|
||||
"automatic_https": {},
|
||||
"max_rehandles": 3,
|
||||
"strict_sni_host": false
|
||||
"strict_sni_host": false,
|
||||
"experimental_http3": false
|
||||
}
|
||||
```
|
||||
|
||||
@ -756,6 +757,7 @@ A map of server ID (of your choice) to its configuration object. Each server is
|
||||
- `automatic_https`: Customize or disable automatic HTTPS.
|
||||
- `max_rehandles`: How many rehandles to allow; prevents infinite looping.
|
||||
- `strict_sni_host`: If true, enforce that an HTTP Host header matches the connection's ServerName (SNI) value from the TLS handshake. Important when using TLS client authentication.
|
||||
- `experimental_http3`: If true, IETF-draft-compliant HTTP/3 ("QUIC") will be enabled. It creates a UDP listener. This feature is experimental and is not subject to compatibility promises.
|
||||
|
||||
#### http/servers/listen
|
||||
|
||||
@ -1449,6 +1451,75 @@ Transport modules:
|
||||
- `split_path`: To create the FastCGI environment, the URI path will be split into two parts, with the first part ending with the first occurrence of this substring. The first part will be used as the actual resource (CGI script) name in DOCUMENT_URI, and the second piece will be set to PATH_INFO for the CGI script to use.
|
||||
- `env`: Key-value pairs to add to the FastCGI environment.
|
||||
|
||||
Load balancing policies:
|
||||
|
||||
**round_robin**: Host is selected in turn.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "round_robin"
|
||||
}
|
||||
```
|
||||
|
||||
**random**: Host is selected randomly.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "random"
|
||||
}
|
||||
```
|
||||
|
||||
**random_choose**: A number of hosts (N) are randomly selected, then the host with the fewest concurrent connections is chosen from among those. N defaults to 2 and is the recommended value. Also referred to as _the power of two random choices_.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "random_choose",
|
||||
"choose": 2
|
||||
}
|
||||
```
|
||||
|
||||
**least_conn**: Host with the fewest number of concurrent requests is selected. If tied for fewest, host is chosen randomly from among them.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "least_conn"
|
||||
}
|
||||
```
|
||||
|
||||
**first**: First available host is selected.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "first"
|
||||
}
|
||||
```
|
||||
|
||||
**ip_hash**: Host is selected by hashing the remote IP of the request. Each client IP will always get the same host, but specifically which host is arbitrary.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "ip_hash"
|
||||
}
|
||||
```
|
||||
|
||||
**header**: Host is selected by hashing the value of a request header. Each request with a certain header value will get the same host, but specifically which host is arbitrary.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "header",
|
||||
"field": "Field-Name"
|
||||
}
|
||||
```
|
||||
|
||||
**uri_hash**: Host is selected by hashing the request URI. Each request with a certain URI will get the same host, but specifically which host is arbitrary.
|
||||
|
||||
```json
|
||||
{
|
||||
"policy": "uri_hash"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
##### http.handlers.subroute
|
||||
|
||||
Creates a group of routes that are compiled and executed when this handler is invoked. This is useful if the evaluation of matchers needs to be deferred, like if they depend on placeholders created by other matchers or handlers that need to be evaluated first.
|
||||
|
Loading…
x
Reference in New Issue
Block a user