Service http checks data source for agentless proxies#14924
Merged
jshahriddhi merged 5 commits intomainfrom Oct 12, 2022
Merged
Service http checks data source for agentless proxies#14924jshahriddhi merged 5 commits intomainfrom
jshahriddhi merged 5 commits intomainfrom
Conversation
4285d3f to
588c55c
Compare
boxofrad
reviewed
Oct 10, 2022
Contributor
boxofrad
left a comment
There was a problem hiding this comment.
This is looking great, nice job! 🙌🏻
Just one thing I think we need to address. Totally my fault for not mentioning it earlier, sorry! 🙈
2ab2eb9 to
8a62072
Compare
Adds another datasource for proxycfg.HTTPChecks, for use on server agents. Typically these checks are performed by local client agents and there is no equivalent of this in agentless. Hence, it is mostly a no-op on servers but in the case where the service is present within the local state, it delegates to the cache data source.
boxofrad
approved these changes
Oct 12, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds another datasource for
proxycfg.HTTPChecks, for use on server agents. Typically these checks are performed by local client agents and there is no equivalent of this in agentless (where servers configure consul-dataplane proxies).Hence, the data source is mostly a no-op on servers but in the case where the service is present within the local state, it delegates to the cache data source.
Background
Using the cache data source for configuring agentless proxies when the service is not in the server local state causes an increase in the http checks fetch error rate which in turn causes a spike in memory usage (eventually leading to server OOM kill).
Although this issue was only the symptom and the current PR solves this symptom ; the root cause fix of the memory leak is being handled here: #14908. The current PR also removes the red-herring that was creating noise in the server logs.
Testing & Reproduction steps
Ran the consul agent in server mode locally. Registered a service and established an xDS session with the server via consul-dataplane. The below warnings go away with the fix in the PR
2022-10-07T13:17:03.060-0700 [WARN] agent.cache: handling error in Cache.Notify: cache-type=service-http-checks error="Internal cache failure: service 'db-1' not in agent state" index=0