Skip to content

Grpc Load Balancing not working #633

@metalLeveller

Description

@metalLeveller

Describe the bug
GRPC Load Balancing is not working for several pods in one service. VirtualRouter is sending all requests to only one pod.

Steps to reproduce
Create two services (let's call them A and B), with one service (A) receiving traffic from outside world, and invoking GRPC method on the other service (B). Create multiple pods for service B.

Expected outcome
Traffic should be equally distributed between pods of service B.

Environment

  • App Mesh controller version: appmesh-controller:v1.6.0
  • Envoy version: aws-appmesh-envoy:v1.22.2.1-prod
  • Are you using any integrations? No
  • Kubernetes version: 1.23
  • Using EKS (yes/no), if so version? yes, 1.23

Additional Context:
Looks like duplicate, but that solution didn't work.

Confurigations:

kind: VirtualService
metadata:
  name: user-service
  namespace: app
spec:
  awsName: user-service.app.svc.cluster.local
  provider:
    virtualRouter:
      virtualRouterRef:
        name: user-service-virtual-router
kind: VirtualRouter
metadata:
  namespace: app
  name: user-service-virtual-router
spec:
  listeners:
    - portMapping:
        port: 6565
        protocol: grpc
  routes:
    - name: user-service-route
      httpRoute:
        match:
          prefix: /
        action:
          weightedTargets:
            - virtualNodeRef:
                name: user-service
              weight: 1
kind: VirtualNode
metadata:
  name: user-service
  namespace: app
spec:
  podSelector:
    matchLabels:
      app: user-service
  listeners:
    - portMapping:
        port: 6565
        protocol: grpc
  serviceDiscovery:
    awsCloudMap:
      namespaceName: app
      serviceName: user-service

We were trying to use different configurations for service discovery:

    dns:
      hostname: user-service.app.svc.cluster.local

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions