Using gRPC on AWS

7,675 views
Skip to first unread message

Daniel Rios

unread,
Jan 18, 2017, 7:59:40 AM1/18/17
to grpc.io
Hey all,

I'm interested on trying out gRPC on AWS, but I am new to this and couldn't find examples or documentation related. Is it possible, due the HTTP/2 features?, I also wonder how doable this is.

Thanks

Carl Mastrangelo

unread,
Jan 18, 2017, 1:18:06 PM1/18/17
to grpc.io
I'm not as familiar with AWS, but what difficulties did you suspect might come up?  

al...@ly.st

unread,
Jan 19, 2017, 9:18:18 AM1/19/17
to grpc.io
gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine.

What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

ELBs work in TCP mode, but you give up useful health checking and the join-shortest-queue behaviour that makes normal HTTP mode ELBs good. It also means you may experience problems with how well balanced your cluster is since only individual client connections are balanced rather than individual requests to the backend. If a single client is generating a lot of requests, they will all go to the same backend rather than being balanced across your available instances.

This also means that ECS doesn't really work properly since it only supports the use of ELB and ALB load balancers.

If your requirements are not too demanding TCP mode ELBs do work, and you can definitely ship stuff that way. It's just not ideal and has some fairly major problems as your request rates and general system complexity increase.

dbo...@gmail.com

unread,
Jan 20, 2017, 10:17:55 AM1/20/17
to grpc.io, al...@ly.st
I haven't tried using gRPC on AWS but it is on my TODO list in near future. 


So theoretically some kind of ALB + EC2 (and ECS) setup should work.
AFAIK API Gateway and Elastic Beanstalk are not possibilities currently.

Hope this helps.

William Thurston

unread,
Jan 20, 2017, 10:45:47 AM1/20/17
to dbo...@gmail.com, grpc.io, al...@ly.st
I use gRPC on AWS  and it works great. However, I don't believe ALBs support trailers in the HTTP/2 spec, so that won't work. Something may have changed since the last time I looked, but don't count on an HTTP/2 ALB working.  I believe it's HTTP/2 to clients of the ELB but HTTP/1.1 to your backend servers. 

William Thurston
--
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.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d2327ec2-9aa6-47b2-b4bf-a210cb165fb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dbo...@gmail.com

unread,
Jan 20, 2017, 11:04:29 AM1/20/17
to grpc.io, dbo...@gmail.com, al...@ly.st
Oh Ok. Good to know. Thanks for the info.

Louis Ryan

unread,
Jan 20, 2017, 1:19:46 PM1/20/17
to dbo...@gmail.com, grpc.io, al...@ly.st
Alternatively use ELB/ALB at Layer-3 but put your own HTTP2 compliant proxy behind it (Envoy, nghttpx, Linkerd, Traefik, ...)

I know Lyft does this in production with Envoy.

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.
Visit this group at https://groups.google.com/group/grpc-io.

yz

unread,
Mar 8, 2018, 11:21:29 PM3/8/18
to grpc.io

How to use ALB at Layer 3? it only supports HTTP/HTTPS?

kvsravin...@gmail.com

unread,
Jan 23, 2019, 7:07:28 AM1/23/19
to grpc.io
Hi Ryan,

I am facing issues communicating between rest endpoints to grpc applications with ALB/NLB. I really appreciate if you could provide some steps to fix this issue.
Reply all
Reply to author
Forward
0 new messages