Circuit breaker in Apigee Public cloud

Hi, I am trying to implement Apigee circuit breaker using MaxFailures and HealthMonitor in Traget but its not working. Here is the below code and error . Please suggest.

2

503

504

500

{targetpath}

true

5

10

30

80

GET

{targetpath}

200

YourOK

Error getting:

Always the below getting even the Target server is giving 200 OK :

{“fault”:{“faultstring”:“The Service is temporarily unavailable”,“detail”:{“errorcode”:“messaging.adaptors.http.flow.NoActiveTargets”}}}

I believe you can not specify variables in health monitors.

There is target path variable in health monitor.

I removed , give a physical path but still same error. Could not find out where is the issue as I am using cloud version. Please suggest.

true 5 10 10 80 POST mem/web/login/v3/memlogin 200 YourOK

Some things to check

  • Are you setting the customer header ImOK per your health monitor configuration? Otherwise just look at the response code?

  • Double check the path, I would have expected a leading /

  • You’re doing a POST to this endpoint? Is that correct, rather than a GET?

I removed the header part , just pass the response code . Also added / in path . But still getting NoActiveTargets error.

What I did , 1st time ,make my target API throw 504 timeout error . once the maxfailure reach more than 2 , then bringing up the target API to give 200.

While trace I saw its failing after the target flow started , while the target API is 504.

2

503

504

500

****{targetpath}

true 5 10 10 80 POST /mem/web/login/v3/memlogin 200

Please suggest.