Deploying gRPC Services

57 views
Skip to first unread message

Selcuk Bozdag

unread,
Jul 3, 2017, 4:55:25 AM7/3/17
to grpc.io
Hi,

We are very new to gRPC and coming from a monolith world. We are not using Google's or any other ready-to-use cloud machines. I have a few questions.

* Should we create each of services in separate processes?
* Should our gRPC clients need to know all the port numbers of the processes?
* Can our gRPC clients access the gRPC services by one ip:port access point?

It would be great if you could share your development and deployment patterns, methods and tools.

Thanks,

Evan Jones

unread,
Jul 9, 2017, 11:21:40 AM7/9/17
to grpc.io
This is a complex set of questions, where the right answer is going to depend on a lot of factors such as how you want to deploy your code, how many services you have, etc. Some random opinions:

Using one ip:port and using separate processes or not: Using gRPC, it is possible to create a process that hosts multiple separate services on a single IP:port. This means you CAN stick everything in a single process, or you can use multiple processes. It is up to you to decide what makes the most sense.


Should clients know the ip:port of the processes: At some level, they need to know *something* to be able to send requests to them. The simplest thing is to have a hard-coded list of backends. The most complex is probably to have some sort of service discovery thing, or use a load balancer.

Can gRPC clients access services using a single ip:port: Yes. You can either have them talk directly to a single process, or use a gRPC-aware load balancer. Envoy might help here: https://lyft.github.io/envoy/docs/intro/arch_overview/grpc.html


Sorry this doesn't have much detail. The answers are really going to depend a lot. Hope this helps,

Evan
Reply all
Reply to author
Forward
0 new messages