liuhengloveyou commented on a change in pull request #2339: URL: https://github.com/apache/apisix/pull/2339#discussion_r502807481
########## File path: doc/plugins/api-breaker.md ########## @@ -0,0 +1,106 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +- [中文](../zh-cn/plugins/api-blocker.md) + +# Summary + +- [**Name**](#name) +- [**Attributes**](#attributes) +- [**How To Enable**](#how-to-enable) +- [**Test Plugin**](#test-plugin) +- [**Disable Plugin**](#disable-plugin) + +## Name + +The plugin implements API fuse functionality to help us protect our upstream business services. + +About the breaker timeout logic; the current version does not open the relevant configuration items to the user, the code logic automatically **triggers the unhealthy state **incrementation of the number of operations. + +For example, if the upstream service returns `unhealthy.http_statuses` state and reaches `unhealthy.failures` for the first time, **the breaker will take 2 seconds**. Then, after 2 seconds, the upstream service returns `unhealthy.http_statuses` continuously again and reaches to `unhealthy.failures` a second time, **breaker for 4 seconds**. And so on, up to a maximum of 300 seconds is not increased. Review comment: added ---------------------------------------------------------------- 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]
