Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipeline-manager: share an awc::Client instance instead of creating one per ingress/egress stream #1257

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

lalithsuresh
Copy link
Collaborator

We've been seeing a repeatable issue with our deployments where demos
generating high HTTP ingress/egress traffic load, eventually hit a 502
bad gateway error in the cloud form factor.

Repeating such a workload against a local instance of the pipeline
manager revealed the issue: we we were creating too many connections
from the pipeline-manager when forwarding HTTP streams, which in turn
led to resource exhaustion. This was because we were creating a new
awc::Client instance per stream to forward HTTP streams to the pipeline.

The awc::Client::new() documentation is clear that we should be
creating at most one instance of the client per thread (and we were
definitely not respecting that).

This PR fixes this issue by sharing one instance of an awc::Client
per actix server.

Signed-off-by: Lalith Suresh lalith@feldera.com

Is this a user-visible change (yes/no): yes

…ne per ingress/egress stream

We've been seeing a repeatable issue with our deployments where demos
generating high HTTP ingress/egress traffic load, eventually hit a 502
bad gateway error in the cloud form factor.

Repeating such a workload against a local instance of the pipeline
manager revealed the issue: we we were creating too many connections
from the pipeline-manager when forwarding HTTP streams, which in turn
led to resource exhaustion. This was because we were creating a new
awc::Client instance per stream to forward HTTP streams to the pipeline.

The awc::Client::new() documentation is clear that we should be
creating at most one instance of the client per thread (and we were
definitely not respecting that).

This PR fixes this issue by sharing one instance of an awc::Client
per actix server.

Signed-off-by: Lalith Suresh <lalith@feldera.com>
@lalithsuresh lalithsuresh merged commit 1c0709b into main Jan 15, 2024
5 checks passed
@lalithsuresh lalithsuresh deleted the http-perf branch January 15, 2024 15:07
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.

None yet

3 participants