update default load balance option

This commit is contained in:
Jun Kurihara 2023-05-26 15:43:23 +09:00
commit f66be5fef1
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
7 changed files with 60 additions and 20 deletions

View file

@ -108,7 +108,7 @@ revese_proxy = [
#### Load Balancing
You can specify multiple backend locations in the `reverse_proxy` array for *load-balancing*. Currently it works in the manner of round-robin.
You can specify multiple backend locations in the `reverse_proxy` array for *load-balancing* with an appropriate `load_balance` option. Currently it works in the manner of round-robin or in the random fashion. if `load_balance` is not specified, the first backend location is always chosen.
```toml
[apps."app_name"]
@ -117,8 +117,11 @@ reverse_proxy = [
{ location = 'app1.local:8080' },
{ location = 'app2.local:8000' }
]
load_balance = 'round_robin'
```
(TODO: Sticky session is currently being implemented)
### Second Step: Terminating TLS
First of all, you need to specify a port `listen_port_tls` listening the HTTPS traffic, separately from HTTP port (`listen_port`). Then, serving an HTTPS endpoint can be easily done for your desired application just by specifying TLS certificates and private keys in PEM files.