-
Notifications
You must be signed in to change notification settings - Fork 319
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
feat: client side load balancing for user transformations #5375
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/1.40.x #5375 +/- ##
==================================================
+ Coverage 74.77% 74.82% +0.04%
==================================================
Files 439 440 +1
Lines 61378 61422 +44
==================================================
+ Hits 45895 45957 +62
+ Misses 12940 12928 -12
+ Partials 2543 2537 -6 ☔ View full report in Codecov by Sentry. |
f3909a7
to
61ec336
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR is attempting to address an imbalance issue observed in production. The rudder-server client tends to open more connections proportionally to older UT or ha-proxy pods. Not allowing the downstream system to scale horizontally.
The PR introduces two alternative HTTP clients to address that:
Transformer.Client.ttl
. It uses the same transport as the standard client and the same configuration.Clients can be selected from
Transformer.Client.type
config, by defaultstdlib
is used.Testing
recycled
was heavily tested in load-test environment under heavy load for a long time. It manage to maintain good enough latencies for a dedicated user transformer.httplb is also tested in the same environment, but with mixed results:
Note: due to node.js clustering, UT is spawning multiple processes, all subscribed to the same port.
Here you can see the comparison between
recycled
(left) andhttplb
(right):Assuming HPA stability is fixed,
httplb
would fair much better thanrecycled
.Linear Ticket
https://linear.app/rudderstack/issue/PIPE-1720/client-side-load-balancing-for-transformations
resolves PIPE-1720
Security