Load balancing in grpc

1,617 views
Skip to first unread message

Vladimir Petrov

unread,
Mar 4, 2015, 1:06:45 PM3/4/15
to grp...@googlegroups.com
Just curious, how do you implement load balancing? Do you have some intermediate proxies or just round-robin over set of upstreams?

Louis Ryan

unread,
Mar 10, 2015, 12:04:16 PM3/10/15
to grp...@googlegroups.com
We will likely do both but for the moment you can use a proxy load balancer like HAProxy. Client-side load-balancing has definite performance advantages but makes deployment more complex in general.

I'm going to post a Gist on how to use HAProxy in the next few days but it's not particularly complex. This would be Layer-3 for the moment, when there's a viable Layer-7 option we'll post about that.

huzhon...@gmail.com

unread,
Apr 20, 2015, 6:22:59 AM4/20/15
to grp...@googlegroups.com
i want to know whether you have post about the Gist on how to use HAProxy. Thanks!

Louis Ryan

unread,
Apr 20, 2015, 12:19:18 PM4/20/15
to huzhon...@gmail.com, grpc-io
It's really nothing special, just need to configure ALPN and make the right certs available...

defaults
  log global
  option tcplog
  timeout connect           4s
  timeout server          300s
  timeout client          300s

# accept connections on port 443 (SSL)
# - forward HTTP/2 connections to grpc_cluster
# - ha.pem should be a concatenated file: certificate first then the key

frontend grpc
  mode tcp

  # advertise http/2 support via ALPN
  bind :9992 ssl crt consolidated.pem alpn h2-17,h2-16

  default_backend grpc_server

# GRPC servers running on port 10000
backend grpc_server
  server srv01 127.0.0.1:8080


--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/0ab46128-cd20-4ecc-bbab-c4ead41568f8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages