envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.67k stars 4.75k forks source link

Overload manager action to fail readiness check #33168

Open inssein opened 5 months ago

inssein commented 5 months ago

The recommendation in https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge#best-practices-edge for configuring an overload manager looks like so:

  - name: "envoy.overload_actions.shrink_heap"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.95
  - name: "envoy.overload_actions.stop_accepting_requests"
    triggers:
    - name: "envoy.resource_monitors.fixed_heap"
      threshold:
        value: 0.98

For folks who are running envoy in a cloud native environment, would it not be better to provide an action that will start failing the healtcheck, so the /ready endpoint starts failing? In this scenario, traffic won't be sent to the pod until the service is healthy again.

yanavlasov commented 5 months ago

I've added help_wanted to find someone who wants to implement this feature.

inssein commented 5 months ago

thanks @yanavlasov - any thoughts on whether this makes sense? I was kind of feeling like it doesn't exist for a reason.

If someone uses the readiness check for a liveness check, it could be bad news as that instance would be removed from rotation, but as long as its readiness only, seems fine to me.

yanavlasov commented 5 months ago

Your request seemed reasonable to me. It needs someone motivated enough to get implemented.

yash97 commented 4 months ago

Hi @yanavlasov can i work on this? I am motivated enough ;).

vikaschoudhary16 commented 4 months ago

@inssein what you think could be triggers for this new action?