googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6.1k stars 816 forks source link

Allocation Endpoint - Better load balancing for gRPC connection #1872

Closed markmandel closed 1 year ago

markmandel commented 4 years ago

Is your feature request related to a problem? Please describe.

The Kubernetes load balancer doesn't load balance a single gRPC connection across multiple pods, so when doing Allocations via the gRPC endpoint, a single client will only ever connect and use a single allocation Pod.

Describe the solution you'd like

Have the system load balance across each of the allocation pods, without requiring the external integration team (i.e. the end user) to do extra work.

Some research:

  1. https://grpc.io/blog/grpc-load-balancing/
  2. https://blog.nobugware.com/post/2019/kubernetes_mesh_network_load_balancing_grpc_services/
  3. https://kubernetes.io/blog/2018/11/07/grpc-load-balancing-on-kubernetes-without-tears/
  4. https://itnext.io/proxyless-grpc-load-balancing-in-kubernetes-ca1a4797b742
  5. https://cloud.google.com/solutions/exposing-grpc-services-on-gke-using-envoy-proxy

The Envoy based solution from Google Cloud looks to me to be the most viable.

The potentially interesting part would be that the TLS certificates would then be handled by Envoy rather than the Allocation endpoint itself.

Describe alternatives you've considered

Leave things as is. Allocation seems to be performing reasonably well (or at least it should do once #1863 is merged)

Additional context

Initially discussed here: https://github.com/googleforgames/agones/pull/1867#discussion_r512122210

markmandel commented 4 years ago

@pooneh-m would love your thoughts.

markmandel commented 3 years ago

This would now have to cover both gRPC and HTTP endpoints - as we handle both now in the 1.11.0 RC that came out yesterday.

roberthbailey commented 3 years ago

@ilkercelikyilmaz FYI

github-actions[bot] commented 1 year ago

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

github-actions[bot] commented 1 year ago

This issue is marked as obsolete due to inactivity for last 60 days. To avoid issue getting closed in next 30 days, please add a comment or add 'awaiting-maintainer' label. Thank you for your contributions