-
-
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
71ea469
commit 55508bf
Showing
3 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
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,70 @@ | ||
: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* | ||
method PUT | ||
} | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":8884" | ||
], | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"handler": "reverse_proxy", | ||
"load_balancing": { | ||
"retries": 5, | ||
"retry_match": [ | ||
{ | ||
"method": [ | ||
"POST" | ||
], | ||
"path": [ | ||
"/foo*" | ||
] | ||
}, | ||
{ | ||
"method": [ | ||
"PUT" | ||
], | ||
"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
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