Use round-robin load balancing strategy for usage service#7920
Use round-robin load balancing strategy for usage service#7920
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a configurable loadBalanceStrategy for proxy routes, defaulting to Cookie. The graphql-api and usage services are updated to use the RoundRobin strategy. Feedback suggests using JSDoc to document the default value for the new property.
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
| path: '/usage', | ||
| service: usage.service, | ||
| retriable: true, | ||
| loadBalanceStrategy: 'RoundRobin', |
There was a problem hiding this comment.
I would assume that the usage SDK is not sending any cookies in the first place since it is not a browser client.
There was a problem hiding this comment.
Thus, I am doubting whether this change would change anything. It might be worth exploring what would be the fallback load balancing strategy in case of a missing cookie.
| loadBalancerPolicy: { | ||
| strategy: 'Cookie', | ||
| strategy: route.loadBalanceStrategy ?? 'Cookie', |
There was a problem hiding this comment.
In any case, all of our services are stateless, so I think we can remove Cookie as the default. (unrelated to the problem we are trying to be solving here)
Background
Description
Checklist