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 2022/01/24 07:20:53 UTC

[GitHub] [apisix] davidwhf commented on issue #6175: request help: api-breaker plugin donot work

davidwhf commented on issue #6175:
URL: https://github.com/apache/apisix/issues/6175#issuecomment-1019791484


   > Hi, @davidwhf. I think you should config the upstream (even if a bad upstream) so that it can work well.
   > 
   > You can try this:
   > 
   > ```
   > {
   >     "plugins": {
   >         "api-breaker": {
   >             "break_response_code": 502,
   >             "unhealthy": {
   >                 "http_statuses": [503],
   >                 "failures": 2
   >             },
   >             "healthy": {
   >                 "http_statuses": [200],
   >                 "successes": 1
   >             }
   >         }
   >     },
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "127.0.0.1:3333": 1
   >         }
   >     },
   >     "uri": "/test/*"
   > }
   > ```
   
   In fact, I refer to the example of official documents.
   see as https://apisix.apache.org/zh/docs/apisix/plugins/api-breaker/
   503 is an http error code that the resource cannot be found. Therefore, although upstream is not configured, the http request return 503.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org