Skip to content

Service http checks data source for agentless proxies#14924

Merged
jshahriddhi merged 5 commits intomainfrom
net-130
Oct 12, 2022
Merged

Service http checks data source for agentless proxies#14924
jshahriddhi merged 5 commits intomainfrom
net-130

Conversation

@jshahriddhi
Copy link
Contributor

@jshahriddhi jshahriddhi commented Oct 7, 2022

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

@jshahriddhi jshahriddhi requested a review from boxofrad October 7, 2022 21:25
@jshahriddhi jshahriddhi force-pushed the net-130 branch 2 times, most recently from 4285d3f to 588c55c Compare October 7, 2022 21:54
Copy link
Contributor

@boxofrad boxofrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, nice job! 🙌🏻

Just one thing I think we need to address. Totally my fault for not mentioning it earlier, sorry! 🙈

@jshahriddhi jshahriddhi force-pushed the net-130 branch 2 times, most recently from 2ab2eb9 to 8a62072 Compare October 10, 2022 20:46
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.
@jshahriddhi jshahriddhi merged commit 345191a into main Oct 12, 2022
@jshahriddhi jshahriddhi deleted the net-130 branch October 12, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants