GRPC load balancing & connection pooling (golang)

5,909 views
Skip to first unread message

pa...@theorangechef.com

unread,
Oct 27, 2015, 3:09:24 PM10/27/15
to grpc.io
I was wondering if anyone put together a solution for load balancing w/ connection pooling for grpc-go? Does anyone have a solution for this? Are there plans on adding this feature to the framework? If so, is there an ETA for this feature?

Thanks,
Paul

Qi Zhao

unread,
Oct 27, 2015, 3:11:15 PM10/27/15
to pa...@theorangechef.com, grpc.io
We are actively working on this. Some generic design doc will be published first. And the initial work should be done by the end of this quarter.

--
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/1b7eb200-f812-4fa3-9730-7b978eb1e425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
-Qi

chao...@grabtaxi.com

unread,
Dec 3, 2015, 1:28:32 AM12/3/15
to grpc.io, pa...@theorangechef.com
Is the design doc available some where now?

Johan Jian An Sim

unread,
Jan 14, 2016, 9:04:53 PM1/14/16
to grpc.io
Any update on this, Qi Zhao?

Qi Zhao

unread,
Jan 14, 2016, 9:40:00 PM1/14/16
to Johan Jian An Sim, grpc.io
should be out this Quarter if everything is under plan.

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.

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



--
Thanks,
-Qi

Johan Sim

unread,
Jan 14, 2016, 9:42:35 PM1/14/16
to Qi Zhao, grpc.io
Great. Any plan to reveal some doc before the actual implementation? So that we know what is coming and be prepared.

On Fri, 15 Jan 2016 at 10:39 Qi Zhao <zh...@google.com> wrote:
should be out this Quarter if everything is under plan.
On Thu, Jan 14, 2016 at 6:04 PM, Johan Jian An Sim <joha...@gmail.com> wrote:
Any update on this, Qi Zhao?

On Wednesday, 28 October 2015 03:09:24 UTC+8, Paul Pietkiewicz wrote:
I was wondering if anyone put together a solution for load balancing w/ connection pooling for grpc-go? Does anyone have a solution for this? Are there plans on adding this feature to the framework? If so, is there an ETA for this feature?

Thanks,
Paul

--
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.



--
Thanks,
-Qi

Qi Zhao

unread,
Jan 14, 2016, 9:44:40 PM1/14/16
to Johan Sim, grpc.io
Yeah, publishing some doc would be the first step. Let me poke around to set up a timeline. :)

On Thu, Jan 14, 2016 at 6:42 PM, Johan Sim <joha...@gmail.com> wrote:
Great. Any plan to reveal some doc before the actual implementation? So that we know what is coming and be prepared.
On Fri, 15 Jan 2016 at 10:39 Qi Zhao <zh...@google.com> wrote:
should be out this Quarter if everything is under plan.
On Thu, Jan 14, 2016 at 6:04 PM, Johan Jian An Sim <joha...@gmail.com> wrote:
Any update on this, Qi Zhao?

On Wednesday, 28 October 2015 03:09:24 UTC+8, Paul Pietkiewicz wrote:
I was wondering if anyone put together a solution for load balancing w/ connection pooling for grpc-go? Does anyone have a solution for this? Are there plans on adding this feature to the framework? If so, is there an ETA for this feature?

Thanks,
Paul

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.



--
Thanks,
-Qi



--
Thanks,
-Qi

Johan Jian An Sim

unread,
Jan 18, 2016, 7:52:51 PM1/18/16
to grpc.io, joha...@gmail.com
Nice. Was digging a little bit through the API just to see if there is anything that I can do now for this issue. Seems like Picker (https://godoc.org/google.golang.org/grpc#Picker) was already in the codebase for quite long and seems to be part of the solution. However, just curious how far away are we from the actual implementation?


On Friday, 15 January 2016 10:44:40 UTC+8, Qi Zhao wrote:
Yeah, publishing some doc would be the first step. Let me poke around to set up a timeline. :)
On Thu, Jan 14, 2016 at 6:42 PM, Johan Sim <joha...@gmail.com> wrote:
Great. Any plan to reveal some doc before the actual implementation? So that we know what is coming and be prepared.
On Fri, 15 Jan 2016 at 10:39 Qi Zhao <zh...@google.com> wrote:
should be out this Quarter if everything is under plan.
On Thu, Jan 14, 2016 at 6:04 PM, Johan Jian An Sim <joha...@gmail.com> wrote:
Any update on this, Qi Zhao?

On Wednesday, 28 October 2015 03:09:24 UTC+8, Paul Pietkiewicz wrote:
I was wondering if anyone put together a solution for load balancing w/ connection pooling for grpc-go? Does anyone have a solution for this? Are there plans on adding this feature to the framework? If so, is there an ETA for this feature?

Thanks,
Paul

--
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.



--
Thanks,
-Qi



--
Thanks,
-Qi

Qi Zhao

unread,
Jan 19, 2016, 7:01:08 PM1/19/16
to grpc.io, joha...@gmail.com


On Monday, January 18, 2016 at 4:52:51 PM UTC-8, Johan Jian An Sim wrote:
Nice. Was digging a little bit through the API just to see if there is anything that I can do now for this issue. Seems like Picker (https://godoc.org/google.golang.org/grpc#Picker) was already in the codebase for quite long and seems to be part of the solution. However, just curious how far away are we from the actual implementation?
Yup, Picker is for this purpose -- we will have a load-balance picker impl. 

Qi Zhao

unread,
Jan 21, 2016, 5:33:22 PM1/21/16
to Johan Jian An Sim, grpc.io, David Garcia Quintas
David (cc-ed) will publish the designdoc of load balancing on behalf of grpc team.

To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.

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



--
Thanks,
-Qi

Jeff Hodges

unread,
Jan 29, 2016, 8:23:02 PM1/29/16
to grpc.io, joha...@gmail.com, d...@google.com
Any ETA on that doc? Just curious, not furious, since it's been a week or so. 

Helping a project that wants to move to gRPC but the Picker interface's warning of it being experimental raised some eyebrows. Just want a story to give them is all. Thanks!



--
Thanks,
-Qi

Qi Zhao

unread,
Jan 29, 2016, 8:27:33 PM1/29/16
to Jeff Hodges, grpc.io, Johan Jian An Sim, David Garcia Quintas
On Fri, Jan 29, 2016 at 5:23 PM, Jeff Hodges <je...@somethingsimilar.com> wrote:
Any ETA on that doc? Just curious, not furious, since it's been a week or so. 
dgq@, any updates? 

Helping a project that wants to move to gRPC but the Picker interface's warning of it being experimental raised some eyebrows. Just want a story to give them is all. Thanks!
Picker has had some implementations. Once I have the load balance picker ready, we will be confident the API works pretty well and remove the experimental annotations. 
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.

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



--
Thanks,
-Qi

David Garcia Quintas

unread,
Feb 2, 2016, 2:10:59 AM2/2/16
to Qi Zhao, Jeff Hodges, grpc.io, Johan Jian An Sim
Hi everyone,

Sorry, the ownership of the document writing task hadn't been properly assigned. It does seem it's indeed on my plate :) I'll have it ready by the end of the week and will ping this thread. Please don't hesitate to ping again if necessary :)




--
Thanks,
-Qi

ran...@yikyakapp.com

unread,
Feb 18, 2016, 1:11:40 PM2/18/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com
Is there an eta for this yet or any info on how best to use picker etc?

Qi Zhao

unread,
Feb 18, 2016, 1:13:27 PM2/18/16
to ran...@yikyakapp.com, grpc.io, Jeff Hodges, Johan Jian An Sim
working on it right now. should be done this quarter.
--
Thanks,
-Qi

David Garcia Quintas

unread,
Feb 19, 2016, 3:34:24 PM2/19/16
to Qi Zhao, Jeff Hodges, grpc.io, Johan Jian An Sim

prot...@gmail.com

unread,
Mar 1, 2016, 11:27:28 AM3/1/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com
For what it's worth, we put our servers behind a load balancer (eg haproxy/aws elb) and do layer 3 (TCP-level) load-balancing. I'm not entirely sure what's the benefit of having this be in gRPC itself.

zel...@gmail.com

unread,
Mar 2, 2016, 10:24:29 AM3/2/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com, prot...@gmail.com
grpc creates long-lived connections: are you just directing the initial connection when doing load balancing, or terminating TLS, parsing the streams, and load balancing all the individual calls sent over the connection?

prot...@gmail.com

unread,
Mar 2, 2016, 10:45:38 AM3/2/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com, prot...@gmail.com, zel...@gmail.com
For our use case we have multiple clients (>500) with few servers (<5), so we load-balance on the initial connection level. I can see how using haproxy etc. could be problematic for the opposite use case (<5 clients, >500 servers). 

prot...@gmail.com

unread,
Mar 3, 2016, 10:49:40 AM3/3/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com
Hi David,

What load-balancers will be compatible with gRPC? Eg. HAProxy, nginx?

Based on the doc, It looks like the LB responsible for pushing updates to the client.

1. What is the API for doing this?
2. I don't know if the popular LBs out there can push out to other services. Eg. HAProxy can send out emails when a server goes down, but that's about it.

I'd recommend at least a polling mechanism of some sort for getting the server list, since HAProxy already has the following Layer 4 REST APIs: https://www.haproxy.com/doc/aloha/7.0/api/webbased.html#l4-servers


On Friday, February 19, 2016 at 3:34:24 PM UTC-5, David Garcia Quintas wrote:

stev...@gmail.com

unread,
Apr 5, 2016, 2:30:19 PM4/5/16
to grpc.io, zh...@google.com, je...@somethingsimilar.com, joha...@gmail.com, prot...@gmail.com
There has been more discussion on load balancing in https://github.com/grpc/grpc-go/issues/239#issuecomment-204073940. In general, I'm more focused on the client-side case, as that can have much better security properties. Specifically, there may be a case for per-rpc routing, in addition to client-side endpoint injection, avoiding the need for crossing a load balancer.

I'm not sure if this helps, but I hope these commentary can advance the discussion.
Reply all
Reply to author
Forward
0 new messages