Skip to content

Configure YARP for Blocking Traffic When Unhealthy #2709

Discussion options

You must be logged in to vote

What YARP does when you run out of healthy destinations is up to the IAvailableDestinationsPolicy.
There are two such policies built-in: HealthyAndUnknown and HealthyOrPanic.

We currently default to HealthyOrPanic, which will "panic" and allow traffic to all destinations if you run out of healthy ones.
If you switch to HealthyAndUnknown, you will see the behavior you wanted, where YARP will respond with a 503.

"HealthCheck": {
  "AvailableDestinationsPolicy": "HealthyAndUnknown",
  "Active": {
    // ...
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@roneytham-ideagen
Comment options

Answer selected by roneytham-ideagen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants