-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
request help: Health Checks can support Backup server? #1809
Comments
I know this is a bit complicated, I will try to see if there is a simpler way later.
curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/index.html",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:9999": 1,
"127.0.0.1:1980": 0
},
"checks": {
"active": {
"http_path": "/status",
"host": "test",
"healthy": {
"interval": 2,
"successes": 1
},
"unhealthy": {
"interval": 1,
"http_failures": 2
}
},
"passive": {
"healthy": {
"http_statuses": [200, 201],
"successes": 3
},
"unhealthy": {
"http_statuses": [500, 502],
"http_failures": 3,
"tcp_failures": 3
}
}
}
}
}' |
and another request: sometimes http work and health check listen on different ports , like spring boot cloud so a router config like :
i did not find any health port define in https://github.com/apache/incubator-apisix/blob/master/apisix/schema_def.lua#L81 is it supported now ? |
you should create a new issue about this |
The zero weight node trick works well with most occasions, but it doesn't with chash or least conn balancer. |
Fix apache#1809 Signed-off-by: spacewander <[email protected]>
Fix apache#1809 Signed-off-by: spacewander <[email protected]>
Fix #1809 Signed-off-by: spacewander <[email protected]>
Issue description
health Check plugin in base on Kong
lua-resty-healthcheck
.I need a function that can mark an upstream server as backup.
It will be passed requests when only the primary servers are unavailable.
##LIKE NGINX UPSTREAM CONFIG
USE nginx upstream on http://nginx.org/en/docs/http/ngx_http_upstream_module.html
Environment
apisix version
): 1.4The text was updated successfully, but these errors were encountered: