GRPC on Go: How scalable is it?

70 views
Skip to first unread message

sta...@gmail.com

unread,
Sep 19, 2017, 4:00:00 PM9/19/17
to grpc.io
How scalable is GRPC on Go?

Can I run a GRPC server for every IoT device connected to my server app? I.e. have 10-20k of GRPC servers per process?

Pablo Rozas Larraondo

unread,
Sep 19, 2017, 5:30:53 PM9/19/17
to grpc.io
Could you elaborate a little bit more on your use case? I'm wondering why you'd need one server per connection instead of, in the case of Go, one goroutine serving each request.

gRPC is just a generic library for executing functions on remote machines, it is very open in terms of how you can design your system.

sta...@gmail.com

unread,
Sep 19, 2017, 5:37:36 PM9/19/17
to grpc.io
Yeah, sorry.

By server, I mean a grpc server running inside a co-routine.

I have a number of IoT devices connecting to a go grpc server. For each IoT device I want to offer a set of APIs for internal consumption.

The two solutions that came into mind are:

a. As soon as an IoT device connect, spawn a goroutine and run a proxy grpc server for the specific device. Any internal user that wants to use the APIs for the specific IoT device can connect to the proxy grpc server that will forward the requests to the IoT device.

b. Have just one grpc proxy server per go application and multiplex the requests and forward them to the IoT go-routines.

A feels a bit more distributed and requires less synchronization, but I don't know how well it will scale. Hence my question... Does it make sense?
Reply all
Reply to author
Forward
0 new messages