jujiale commented on issue #10500:
URL: https://github.com/apache/apisix/issues/10500#issuecomment-1894092373
at first, I add the upstream, like below: the 172.20.xxx.xxx is OKļ¼the
172.30.xxx.xxx is bad.
`
{
"nodes": [
{
"host": "172.20.xxx.xxx",
"port": 9113,
"weight": 1
},
{
"host": "172.30.xxx.xxx",
"port": 9113,
"weight": 1
}
],
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"checks": {
"active": {
"concurrency": 10,
"healthy": {
"http_statuses": [
200,
302
],
"interval": 1,
"successes": 2
},
"http_path": "/",
"port": 9113,
"timeout": 2,
"type": "tcp",
"unhealthy": {
"http_failures": 5,
"http_statuses": [
429,
404,
500,
501,
502,
503,
504,
505
],
"interval": 1,
"tcp_failures": 2,
"timeouts": 3
}
}
},
"scheme": "http",
"pass_host": "pass",
"name": "test2",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
}
}
`
then I create a route whicn bind the upstream. and I send a request to this
route, It returns the result as I expect, then I invoke
**http://apisix:9090/v1/healthcheck**, the return is :
`
[{
"src_type": "upstreams",
"healthy_nodes": [{
"host": "172.20.xxx.xxx",
"priority": 0,
"port": 9113,
"weight": 1
}],
"src_id": "496411420712239919",
"name": "upstream#\/test\/apisix\/upstreams\/496411420712239919",
"nodes": [{
"host": "172.20.xxx.xxx",
"priority": 0,
"port": 9113,
"weight": 1
}, {
"host": "172.30.xxx.xxx",
"priority": 0,
"port": 9113,
"weight": 1
}]
}]
`
then I modify the etcd config **auto-compaction-retention=1m** after a
while, the apisix log as following:
`
sync_data(): waitdir [/test/apisix/plugin_configs] err: compacted, will read
the configuration again via readdir
...
`
then I invoke **http://apisix:9090/v1/healthcheck** the result returns an
empty table **{}**
then I send a request to my test route, It also return the data I want, but
the response code is 502,200
as the author say, he thinks that health check readded the unhealthy one,
but I think the reason is that both healthy one and unhealthy one is deleted,
this seems like when you create a route, but send no request. then send a
request, the health check then start.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]