-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Caddyfile support for
retry_match
- Loading branch information
1 parent
5307668
commit 97381dc
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
caddytest/integration/caddyfile_adapt/reverse_proxy_load_balance.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
:8884 | ||
|
||
reverse_proxy 127.0.0.1:65535 { | ||
lb_policy first | ||
lb_retries 5 | ||
lb_try_duration 10s | ||
lb_try_interval 500ms | ||
lb_retry_match { | ||
path /foo* | ||
method POST | ||
} | ||
lb_retry_match path /bar* | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":8884" | ||
], | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"handler": "reverse_proxy", | ||
"load_balancing": { | ||
"retries": 5, | ||
"retry_match": [ | ||
{ | ||
"method": [ | ||
"POST" | ||
], | ||
"path": [ | ||
"/foo*" | ||
] | ||
}, | ||
{ | ||
"path": [ | ||
"/bar*" | ||
] | ||
} | ||
], | ||
"selection_policy": { | ||
"policy": "first" | ||
}, | ||
"try_duration": 10000000000, | ||
"try_interval": 500000000 | ||
}, | ||
"upstreams": [ | ||
{ | ||
"dial": "127.0.0.1:65535" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters