-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_config.yaml
More file actions
39 lines (33 loc) · 1.08 KB
/
Copy pathexample_config.yaml
File metadata and controls
39 lines (33 loc) · 1.08 KB
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
xginx:
name: "MyCustomLB" # Name of the load balancer
host: "0.0.0.0" # Host address to bind
port: 8080 # Port to listen on
scheduler: "round_robin" # Load balancing algorithm: "round_robin", "least_connections", "ip_hash"
health_check:
enabled: true
interval: 5 # Interval (in seconds) for health checks
timeout: 2 # Timeout (in seconds) for a response
retries: 3 # Number of retries before marking a server as down
backend_servers:
- name: "Server1"
address: "localhost"
port: 8081
# weight: 1 # Optional: Load distribution weight
- name: "Server2"
address: "localhost"
port: 8082
# weight: 2 # Higher weight means more requests
security:
tls:
enabled: false
certificate: "/path/to/cert.pem"
private_key: "/path/to/key.pem"
rate_limiting:
enabled: false
requests_per_second: 100
logging:
level: "info" # Log levels: "debug", "info", "warn", "error"
file: "/var/log/load_balancer.log"
sticky_sessions:
enabled: false
type: "ip_hash" # Options: "ip_hash", "cookie"