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

[BUG] gRPC load balancer does not work #78

Open
mostafafarzaneh opened this issue Apr 22, 2024 · 1 comment
Open

[BUG] gRPC load balancer does not work #78

mostafafarzaneh opened this issue Apr 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mostafafarzaneh
Copy link

Summary

Service Connect failed to distribute traffic between the two services correctly when using gRPC

Description

We utilize gRPC for communication between two services: Service A (client) and Service B (server), with Service B running multiple instances for scalability.
Under AppMesh, load balancing across these instances was effective. However, since migrating to Service Connect, all traffic from Service A is directed to a single instance of Service B, bypassing the expected load distribution.

Expected Behavior

Service Connect should distribute traffic across all instances of Service B similarly to how AppMesh did.

Observed Behavior

All traffic is routed to only one instance of Service B, leading to potential performance bottlenecks.

Environment Details

We are using AWS ECS with fargate.

@mostafafarzaneh mostafafarzaneh added the bug Something isn't working label Apr 22, 2024
@adventureisyou
Copy link

Can confirm, we're seeing the same behaviour.

gRPC prefers to hold a single connection and run many streams (requests) over it. ALB and AppMesh both correctly round robin individual streams to backend services, but ECS connect only round robins the connections themselves, meaning that all the cross-service calls from one task go to the same task of the other service. This effect is worsened if all tasks of one service happen pick a single task from the other service to connect to by chance.

We've had to abandon ECS connect for now because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants