-
Notifications
You must be signed in to change notification settings - Fork 18
/
gatewayd.yaml
108 lines (101 loc) · 3.29 KB
/
gatewayd.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
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
# GatewayD Global Configuration
loggers:
default:
output: ["console"] # "stdout", "stderr", "syslog", "rsyslog" and "file"
level: "info" # panic, fatal, error, warn, info (default), debug, trace
noColor: False
timeFormat: "unix" # unixms, unixmicro and unixnano
consoleTimeFormat: "RFC3339" # Go time format string
# If the output contains "file", the following fields are used:
fileName: "gatewayd.log"
maxSize: 500 # MB
# If maxBackups and maxAge are both 0, no old log files will be deleted.
maxBackups: 5
maxAge: 30 # days
compress: True
localTime: False
# Rsyslog config
rsyslogNetwork: "tcp"
rsyslogAddress: "localhost:514"
syslogPriority: "info" # emerg, alert, crit, err, warning, notice, debug
metrics:
default:
enabled: True
address: 0.0.0.0:9090
path: /metrics
readHeaderTimeout: 10s # duration, prevents Slowloris attacks
timeout: 10s # duration
certFile: "" # Certificate file in PEM format
keyFile: "" # Private key file in PEM format
clients:
default:
writes:
network: tcp
address: localhost:5432
tcpKeepAlive: False
tcpKeepAlivePeriod: 30s # duration
receiveChunkSize: 8192
receiveDeadline: 0s # duration, 0ms/0s means no deadline
receiveTimeout: 0s # duration, 0ms/0s means no timeout
sendDeadline: 0s # duration, 0ms/0s means no deadline
dialTimeout: 60s # duration
# Retry configuration
retries: 3 # 0 means no retry and fail immediately on the first attempt
backoff: 1s # duration
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false
reads:
network: tcp
address: localhost:5433
tcpKeepAlive: False
tcpKeepAlivePeriod: 30s # duration
receiveChunkSize: 8192
receiveDeadline: 0s # duration, 0ms/0s means no deadline
receiveTimeout: 0s # duration, 0ms/0s means no timeout
sendDeadline: 0s # duration, 0ms/0s means no deadline
dialTimeout: 60s # duration
# Retry configuration
retries: 3 # 0 means no retry and fail immediately on the first attempt
backoff: 1s # duration
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false
pools:
default:
writes:
size: 10
reads:
size: 10
proxies:
default:
writes:
healthCheckPeriod: 60s # duration
reads:
healthCheckPeriod: 60s # duration
servers:
default:
network: tcp
address: 0.0.0.0:15432
loadBalancer:
# Load balancer strategies can be found in config/constants.go
strategy: ROUND_ROBIN # ROUND_ROBIN, RANDOM, WEIGHTED_ROUND_ROBIN
consistentHash:
useSourceIp: true # Set to false for using the RANDOM strategy
# Optional configuration for strategies that support rules (e.g., WEIGHTED_ROUND_ROBIN)
# loadBalancingRules:
# - condition: "DEFAULT" # Currently, only the "DEFAULT" condition is supported
# distribution:
# - proxyName: "writes"
# weight: 70
# - proxyName: "reads"
# weight: 30
enableTicker: False
tickInterval: 5s # duration
enableTLS: False
certFile: ""
keyFile: ""
handshakeTimeout: 5s # duration
api:
enabled: True
httpAddress: 0.0.0.0:18080
grpcNetwork: tcp
grpcAddress: 0.0.0.0:19090