Comments (5)
Note that health_passes 3
means that after failing, an upstream node needs to pass three successive health checks to become healthy again.
I'm okay with 1 as long as the current behavior remains where a health check is immediately fired and the block is near instantaneous.
I believe other loadbalancers like Nginx (paid) assumes that all listed upstreams are healthy after a reload/restart and doesn't take them out of the mix until the health checks fail.
from caddy.
Marking them as healthy when you don't actually know seems... misleading?
i think the argument can be made that marking them unhealthy is equally misleading. the remote is in superposition, since it has not been obvserved, it's a third distinct state that is currently handled as the unhealthy case. it seems existing implementations tip the scale slightly in favor the healthy superposition, my guess is it is order to have a faster time to first response.
from caddy.
(As clarified in Slack, this is about active Health checks.)
My vote is currently for no. 1.
2 - Is a NO from me because blocking provisioning can make config reloads slow, and we strive to keep them fast and lightweight.
3 - is a NO from me because if the proxy is started before the backends, we can't assume that backends are healthy right away. IMO, active health checks should assume unhealthy unless proven otherwise by a passing health check (compared to passive health checks, which assume healthy until proved otherwise).
Number 1 is nice because it allows the server/config to start quickly, and the requests don't have to fail (even if they are delayed briefly). We also don't have bad status information. I imagine health checks -- especially passing ones -- happen very quickly, so the blocking will be instantaneous, less than 1/4 second probably.
from caddy.
I believe other loadbalancers like Nginx (paid) assumes that all listed upstreams are healthy after a reload/restart and doesn't take them out of the mix until the health checks fail.
basically correct. during investigation i found that nginx plus and traefik set the initial state of the backend when no health checks have been made to them as healthy. However, they do preserve history across restarts to the same hosts (as does caddy, i believe)
from caddy.
basically correct. during investigation i found that nginx plus and traefik set the initial state of the backend when no health checks have been made to them as healthy.
I didn't think about what other servers do when we implemented health checks, but this is surprising to me... it feels wrong for active health checks to assume a healthy backend without checking first. Marking them as healthy when you don't actually know seems... misleading?
However, they do preserve history across restarts to the same hosts (as does caddy, i believe)
Caddy preserves the health status across reloads but if the process quits then the memory is cleared. We don't persist it to storage as of yet.
from caddy.
Related Issues (20)
- Caddy Web GUI HTTPs invalid HOT 1
- Client ends HTTP TLS session with RST
- HTTP3 response payload missing from the packet capture HOT 3
- No matching certificate to load: decoding certificate metadata: invalid character '}' HOT 10
- no certificate available for <docker container ip> HOT 1
- Accommodate `Policy` Changes in `github.com/pires/go-proxyproto` HOT 3
- Question: Reverse tunneling to caddy behind a NAT HOT 2
- dynamic a resolvers being bypassed if entry is in /etc/hosts HOT 1
- [reverse_proxy] active_health check to http endpoint does not work when upstream is via ssl/tls HOT 2
- reverse_proxy handle_response not support status HOT 1
- [Question] Host modules HOT 16
- global header HOT 2
- Weird broken loop with 308 Permanent Redirect on php_fastcgi HOT 10
- How to set up a reverse proxy for a non-local host, I didn't find any relevant examples in the official documentation HOT 1
- http_redirect module prefer 307 Temporary Redirect HOT 2
- header_regexp does not behave as expected in an expression
- [feature request]reverse_proxy can setting source address for connecting upstreams
- [windows] cannot run executable found relative to current directory HOT 6
- ReverseProxy: Multiple BasicAuth queries in succession HOT 1
- Jellyfin being reverse proxied through Caddy with Cloudflare challenge is failing to playback only on LAN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy.