FirstCatchYourHare commented on PR #11415:
URL: https://github.com/apache/apisix/pull/11415#issuecomment-2264819589

   > this bug only occurs when both `healthy` and `max_breaker_sec` are 
configured together?
   
   No,This bug is easy to reproduce.It can be reproduced with the default 
configuration.But it needs to be explained in conjunction with the api-breaker 
plug-in code.
   As shown in the following picture:
   
![api-breaker](https://github.com/user-attachments/assets/925b8b8b-f8ec-4dee-a013-76d944063c8b)
   In an unhealthy state,The request is then retried in 2, 4, 8, 16 ... seconds 
until the max_breaker_sec.In this process, there is often a situation:when the 
specified unhealthy state has not been reached, the breaker is triggered.
   The reason is that when the specified number of unhealthy states is not 
reached, lasttime + breaker_time will occasionally appear to be greater than or 
equal to ngx.time().This causes a breaker to occur.
   The solution is shown in the following figure:
   
![api-breaker2](https://github.com/user-attachments/assets/894dac93-03d1-490d-a9c2-b38220c4443c)
   
   
   
   
   
   
   
   


-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to