forked from hyman-m/balancer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
27 lines (24 loc) · 1.1 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright 2022 <mzh.scnu@qq.com>. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# The load balancing algorithms supported by the balancer are:
# `round-robin` ,`random` ,`p2c` ,`consistent-hash` ,`least-load` ,`bounded` ,`ip-hash`,
# Among these,`p2c` refers to the power of 2 random choice,
# `bounded` refers to consistent hash with bounded.
schema: http # support http and https
port: 8089 # port for balancer
ssl_certificate:
ssl_certificate_key:
tcp_health_check: true
health_check_interval: 3 # health check interval (second)
# The maximum number of requests that the balancer can handle at the same time
# 0 refers to no limit to the maximum number of requests
max_allowed: 100
location: # route matching for reverse proxy
- pattern: /
proxy_pass: # URL of the reverse proxy
- "http://192.168.1.1"
- "http://192.168.1.2:1015"
- "https://192.168.1.2"
- "http://my-server.com"
balance_mode: round-robin # load balancing algorithm