-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathpingap.toml
112 lines (87 loc) · 3.87 KB
/
pingap.toml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# error page html template
error_template = ""
# The pid file of this server. Default `/tmp/pingap.pid`
pid_file = "/tmp/pingap.pid"
# The path to the upgrade socket. Default `/tmp/pingap_upgrade.sock`
upgrade_sock = "/tmp/pingap_upgrade.sock"
# If configured, after daemonization, this process will switch to
# the given user before starting to serve traffic. Default `None`
# user = ""
# Similar to `user`, the group this process should switch to. Default `None`
# group = ""
# How many threads **each** service should get.
# The threads are not shared across services. If the value is 0,
# it will use cpus of system. Default `1`.
threads = 1
# Allow work stealing between threads of the same service. Default `true`.
work_stealing = true
# Grace period in seconds before starting the final step of the graceful shutdown after signaling shutdown.
# Default `5m`.
grace_period = "3m"
# Timeout in seconds of the final step for the graceful shutdown. Default `5s`.
graceful_shutdown_timeout = "10s"
# Upsteam config list, it will defined as [upstreams.name]
[upstreams.charts]
addrs = ["127.0.0.1:5000"]
# Load balancer select algorithm, supports `hash` and `round_robin`. Default `round_robin`
algo = "hash:cookie"
# Upstream health check, supports `tcp`, `http` and `https`. Default `tcp`
# Tcp: tcp://upstreamname?connection_timeout=3s&success=2&failure=1&check_frequency=10s
# Http(s): http://upstreamname/ping?connection_timeout=3s&read_timeout=1s&success=2&failure=1&check_frequency=10s
health_check = "http://charts/ping?connection_timeout=3s&pingap"
# How long to wait before giving up *establishing* a TCP connection. Default `None`
connection_timeout = "10s"
# How long to wait before giving up *establishing* a connection including TLS handshake time.
# Default `None`
total_connection_timeout = "30s"
# How long to wait before each individual `read()` from upstream.
# The timer is reset after each `read()`. Default `None`
read_timeout = "10s"
# How long to wait before a `write()` to upstream finishes. Default `None`
write_timeout = "10s"
# How long to wait before closing a idle connection waiting for connection reuse.
# Set to `0s` will disable connection pooling. Default `None`
idle_timeout = "120s"
# Anther upstream using all default config.
[upstreams.diving]
# static file
addrs = ["file://~/Downloads"]
# addrs = [
# 'mock://{"status":500,"headers":["Content-Type: application/json"],"data":"{\"message\":\"Mock Service Unavailable\"}"}',
# ]
# Location config list, it will defined as [locations.name]
[locations.lo]
# The upstream for location, it will be the name of one upstream.
upstream = "charts"
# How to match the location, it returns true if `host` of http request header
# equal the config, multiple hosts are separated by ",". Default `None` means all match.
host = ""
# How to match the location, it returns true if the `url` starts with `path`.
# Default `None` means all match
path = "/"
# Insert header to proxy request. Default `None`
proxy_headers = ["name:value"]
# Insert header to response. Default `None`
headers = ["name:value"]
# Rewrite the http url for proxy request, `^/api/ /` means replace the prefix `/api/` as `/`.
# Default `None`
rewrite = ""
# The weight of locaton, max is prior, Default `None`
# weight = 4096
# Server config list, it will be defined as [servers.name]
[servers.test]
# TCP listening address
addr = "0.0.0.0:6188"
# tls cert and key, it should be base64
# tls_cert = ""
# tls_key = ""
# Access log format layout for the server. Default `None`
# access_log = '"{method} {uri} {proto}" {status} {size-human} "{referer}" "{user-agent}" {latency-human}'
access_log = "tiny"
# Location list for the server, item should be the name of location.
# The locations should be served by the server.
locations = ["lo"]
# Stats path for get the stats of server. Default `None`
stats_path = "/stats"
# Admin path for admin server. Default `None`
admin_path = "/admin"