feat(health): allow clickhouse check bypass #7600
Merged
+11
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've had a lot of issues over the years with the health check being an issue that takes Snuba API pods down in a way that reduces stability rather than increasing it. Recently, there's an issue where a too-slow health check response, not being caught by our own timeout handling behavior, causes API pods to be taken out of rotation even when we have no evidence that new pods would behave any better.
Rather than scale down when we have connection issues to ClickHouse, this essentially adds an option to keep accepting requests on the pod for as long as uwsgi has capacity. This still is some degradation to the customer (at this time, some of their requests will time out) but assuming some kind of network or envoy issue is causing bad behavior that should recover faster than a pod restart. This option (
health_check_ignore_clickhouse) is going to be disabled by default, but I want to try enabling this behavior inusfor a while and see how it goes.Internal doc on this: https://www.notion.so/sentry/investigation-pod-availability-drop-2ca8b10e4b5d808796c6ecd2e3ad1700