-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom proxy upstream health check #324
Comments
Although I shudder at the thought of the user needing to use and maintain a regex, your proposed syntax is probably how I would do it, if it were to be implemented. Does it need to be a full-blown regex or can we get away with substring matching? (i.e. look for that string in the response body to be considered healthy) |
Yea you're probably right - for all cases where I've done something similar with other load balancers a simple string substring match has been enough. Would the syntax have to be this instead since |
Yeah, duration would be required then. This isn't ideal but let's try it and see how it goes. Saying '10s' isn't too bad. |
Kind of looking at expanding this into how Caddy determines whether to retry requests as well. See comments on #1314. |
Currently the proxy middleware supports a health check that requests a path and executes the following logic on the response.
What would be the best way to add support for logic to fail the health check if the response content does not match a given regex? My initial thought would be to add another parameter to the health_check like
health_check path [duration] [content_regex]
. Would a different syntax be clearer?Thoughts?
The text was updated successfully, but these errors were encountered: