You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/14 03:59:46 UTC

[GitHub] [apisix] idbeta opened a new issue #2746: request help: how could I only enable passive health check

idbeta opened a new issue #2746:
URL: https://github.com/apache/apisix/issues/2746


   ### Issue description
   how could I only enable passive health check?
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master
   * OS:
   
   I did like this, but not working
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/index.html",
       "plugins": {
           "limit-count": {
               "count": 2,
               "time_window": 60,
               "rejected_code": 503,
               "key": "remote_addr"
           }
       },
       "upstream": {
            "nodes": {
               "127.0.0.1:1980": 1,
               "127.0.0.1:1970": 1
           },
           "type": "roundrobin",
           "retries": 2,
           "checks": {
               "passive": {
                   "healthy": {
                       "http_statuses": [200, 201],
                       "successes": 3
                   },
                   "unhealthy": {
                       "http_statuses": [500],
                       "http_failures": 3,
                       "tcp_failures": 3
                   }
               }
           }
       }
   }'
   ```
   return
   ```
   {"error_msg":"invalid configuration: property \"upstream\" validation failed: property \"checks\" validation failed: object matches none of the requireds: [\"active\"] or [\"active\",\"passive\"]"}
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on issue #2746: request help: how could I only enable passive health check

Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2746:
URL: https://github.com/apache/apisix/issues/2746#issuecomment-727175022


   Good to know, I think your answer can be added to the document for beginners.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] gxthrj edited a comment on issue #2746: request help: how could I only enable passive health check

Posted by GitBox <gi...@apache.org>.
gxthrj edited a comment on issue #2746:
URL: https://github.com/apache/apisix/issues/2746#issuecomment-727174592


   It is unreasonable to only enable passive checking. 
   If the upstream node is marked as `unhealthy`, it will not automatically recover, because no traffic will be distributed to the node which is marked as `unhealthy`.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] idbeta closed issue #2746: request help: how could I only enable passive health check

Posted by GitBox <gi...@apache.org>.
idbeta closed issue #2746:
URL: https://github.com/apache/apisix/issues/2746


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] gxthrj commented on issue #2746: request help: how could I only enable passive health check

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #2746:
URL: https://github.com/apache/apisix/issues/2746#issuecomment-727174592


   It is unreasonable to only enable passive checking. 
   If the upstream node is recognized as `unhealthy`, it will not automatically recover, because no traffic will be distributed to the node which is marked as `unhealthy`.


----------------------------------------------------------------
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:
users@infra.apache.org