Firstsawyou opened a new issue #3792:
URL: https://github.com/apache/apisix/issues/3792


   ### Issue description
   
   Related issues:  https://github.com/apache/apisix-dashboard/issues/1563
   
   In the active health check, Host is the host name of the HTTP request used 
to discover the health of the upstream node. It is required only when the 
upstream node has restrictions on Host, otherwise it is optional. I think it 
would be better if `active.host` should be an optional.
   
   In the current active check configuration, I tested that `active.host` is an 
option (I'm not sure if my test is correct), but the documentation doesn't 
explain that. Maybe we need to state in the documentation that `active.host` is 
an option. 
   
   <img width="1052" alt="截屏2021-03-09 下午10 14 16" 
src="https://user-images.githubusercontent.com/52862365/110487564-aa411900-8128-11eb-96eb-293710133356.png";>
   
   
   `active.host` is missing:
   
   ```shell
   $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri":"/index.html",
       "upstream":{
           "nodes":{
               "127.0.0.1:1980":1,
               "127.0.0.1:1970":1
           },
           "type":"roundrobin",
           "retries":2,
           "checks":{
               "active":{
                   "timeout":5,
                   "http_path":"/status",
                   "healthy":{
                       "interval":2,
                       "successes":1
                   },
                   "unhealthy":{
                       "interval":1,
                       "http_failures":2
                   }
               },
               "passive":{
                   "healthy":{
                       "http_statuses":[
                           200,
                           201
                       ],
                       "successes":3
                   },
                   "unhealthy":{
                       "http_statuses":[
                           500
                       ],
                       "http_failures":3,
                       "tcp_failures":3
                   }
               }
           }
       }
   }'
   
   
{"node":{"key":"\/apisix\/routes\/1","value":{"uri":"\/index.html","status":1,"id":"1","upstream":{"nodes":{"127.0.0.1:1980":1,"127.0.0.1:1970":1},"pass_host":"pass","checks":{"active":{"unhealthy":{"http_statuses":[429,404,500,501,502,503,504,505],"http_failures":2,"tcp_failures":2,"interval":1,"timeouts":3},"http_path":"\/status","https_verify_certificate":true,"healthy":{"http_statuses":[200,302],"interval":2,"successes":1},"type":"http","concurrency":10,"timeout":5},"passive":{"unhealthy":{"http_failures":3,"tcp_failures":3,"http_statuses":[500],"timeouts":7},"type":"http","healthy":{"http_statuses":[200,201],"successes":3}}},"scheme":"http","type":"roundrobin","hash_on":"vars","retries":2},"update_time":1615300539,"priority":0,"create_time":1613722689}},"action":"set"}
   ```
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to