contour icon indicating copy to clipboard operation
contour copied to clipboard

configurable default circuit breaking

Open phylake opened this issue 6 years ago • 4 comments

Contour allows circuit breaking fields such as max connections to be configured via annotations. If unset then the Envoy defaults are used. These defaults are much too low, and were one of the callouts at EnvoyCon with regard to sensible defaults in Envoy.

Providing a way to increase these for all IngressRoutes would be ideal. As operators of Contour we'd like to provide some more sensible defaults rather than go out to dozens of service teams and ask them to provide the annotations.

phylake avatar Jun 24 '19 15:06 phylake

I think this could be good to be added to the new configuration file we're adding to Contour. I think allowing admins to set sane defaults for their cluster, then allowing users to further customize (or not maybe?) would be beneficial.

stevesloka avatar Jul 11 '19 17:07 stevesloka

Just to confirm, we'll add the following to the new config file which will set a default on each resource unless overridden:

  • MaxConnections
  • MaxPendingRequests
  • MaxRequests
  • MaxRetries

stevesloka avatar Jul 23 '19 20:07 stevesloka

Hey @phylake, if we were to set reasonable defaults for Contour, what would you set them to (i.e. not having them be configurable)?

stevesloka avatar Aug 05 '19 14:08 stevesloka

We tripped these circuits at very low load so we increased them to 1,000,000 for MaxConnections and MaxRequests just to rule them out as a source of 503s we're seeing. MaxPendingRequests and MaxRetries seemed fine at 1024.

It's hard to say what reasonable is because these settings should really be fine-tuned per service. That said we're well past the C10k problem so 1024 seems obviously too low. I'd recommend doing what we did so Contour doesn't cause problems by default (i.e. leaving Envoy defaults at levels well under what even antiquated architectures can handle). Services can then opt in to circuit breaking at levels that are reasonable for them.

phylake avatar Aug 05 '19 16:08 phylake