1- server :
2- listen_addr : " 0.0.0.0:8080"
3- # worker_threads: 4
4- # tls:
5- # enabled: true
6- # cert_path: "/path/to/cert.pem"
7- # key_path: "/path/to/key.pem"
1+ listeners :
2+ - name : " default"
3+ address : " 0.0.0.0:8080"
4+ # workers: 4
5+ # tls:
6+ # cert_path: "/path/to/cert.pem"
7+ # key_path: "/path/to/key.pem"
8+ # client_auth:
9+ # required:
10+ # ca_path: "/path/to/ca.pem"
811
912telemetry :
1013 level : " debug"
1114 pingora : " warn"
12- access_log : " stdout" # Options: stdout (default), false, or file path
13- # service_name: "pavis-proxy" # Not supported yet
14- # prometheus_addr: "0.0.0.0:9090" # Not supported yet
15- # tracing: # Not supported yet
16- # enabled: true
17- # provider: "opentelemetry"
18- # sampling_rate: 1.0
15+ service_name : " pavis-proxy"
16+ metrics : " 0.0.0.0:9090"
17+ access_log : Stdout
18+ # tracing:
19+ # provider: "otlp"
20+ # sampling: 100
21+ # endpoint: "http://localhost:4317"
22+
23+ shutdown :
24+ enabled : true
25+ drain_timeout_ms : 30000
26+
27+ admin :
28+ enabled : false
29+ address : " 127.0.0.1:9901"
30+
31+ features :
32+ routing :
33+ advanced_matchers : false
34+ regex_limits : {}
1935
2036upstreams :
2137 - name : " backend-v1"
22- lb : " round-robin" # Options: random, round-robin (default)
23- http : " h1" # Options: h1 (default) , h2, h2h1
38+ balancer : " round-robin" # Options: round-robin, random, least-request
39+ protocol : " h1" # Options: h1, h2, h2h1
2440 pool :
25- idle_timeout : " 60s" # Keep connections alive for 60s (default)
26- connection_timeout : " 5s" # Connection timeout (default: 5s)
41+ idle : " 60s" # Default: 60s
42+ connect : " 5s" # Default: 5s
43+ # max: 128
44+ queue_capacity : 0
45+ queue_timeout_ms : 0
2746 # tls:
2847 # enabled: true
2948 # verify_cert: true
3049 # verify_hostname: true
3150 # sni_mode: auto
3251 # # sni: "backend.example.com"
33- # #
34- # # OpenSSL is the only supported TLS backend; these options are enforced:
35- # # ca_bundle_path: "/etc/pavis/certs/upstream-ca.pem"
52+ # # ca_bundle_path: "/etc/pavis/certs/upstream-ca.pem" # Ignored by Rustls backend
3653 # # cert:
3754 # # cert_path: "/etc/pavis/certs/client.crt"
3855 # # key_path: "/etc/pavis/certs/client.key"
@@ -51,42 +68,43 @@ upstreams:
5168 # healthy_threshold: 1
5269 # unhealthy_threshold: 1
5370 endpoints :
54- - ip : " 127.0.0.1"
71+ - address : " 127.0.0.1"
5572 port : 8081
5673 weight : 1
5774
5875 - name : " backend-v2"
59- lb : " random"
60- http : " h2"
76+ balancer : " random"
77+ protocol : " h2"
6178 endpoints :
62- - ip : " 127.0.0.1"
79+ - address : " 127.0.0.1"
6380 port : 8082
6481 weight : 1
6582
6683routes :
6784 - host : " backend"
6885 paths :
69- - match_type : " prefix" # Options: prefix (default), exact, regex
70- path : " /api/v1"
71- # timeout: "2s" # Not supported yet
72- # retry: # Not supported yet
73- # attempts: 3
74- # retry_on: [500, 502, 503, "gateway_error", "connect_failure"]
75- # per_try_timeout: "500ms"
86+ - matcher :
87+ path : !prefix { path: "/api/v1" }
88+ # timeout: "2s"
89+ # retry:
90+ # max_attempts: 3
91+ # retryable_reasons: ["status_code", "connect_error"]
92+ # retryable_status_codes: [502, 503, 504]
93+ # per_try: "500ms"
7694 request_headers :
77- add :
78- x-sidecar-proxy : " pavis"
79- remove :
95+ add_headers :
96+ - [" x-sidecar-proxy", "pavis"]
97+ remove_headers :
8098 - " x-internal-token"
8199 response_headers :
82- add :
83- x-served-by : " pavis"
100+ add_headers :
101+ - [" x-served-by", "pavis"]
84102 destinations :
85103 - upstream : " backend-v1"
86104 weight : 100
87105
88- - match_type : " prefix "
89- path : " /api/v2"
106+ - matcher :
107+ path : !prefix { path: "/api/v2" }
90108 destinations :
91109 - upstream : " backend-v2"
92110 weight : 100
0 commit comments