Only allow a single active connection on a grpc server

55 views
Skip to first unread message

banshe...@googlemail.com

unread,
Apr 4, 2018, 10:38:16 AM4/4/18
to grpc.io
Hello,

is it somehow supported in gRPC itself or are there any best practices to just allow a single client connection on a gRPC server? Assuming I have a server where multiple, especially interleaved client access doesn't make sense, how can I prevent this from happening? I can also think of some sort of simple self-implemented user management where the client generates a unique ID and registers itself with the server which then blocks all other accesses until the client deregisters again.

Regards

Nathaniel Manista

unread,
Apr 4, 2018, 11:38:09 AM4/4/18
to banshe...@googlemail.com, grpc.io
On Wed, Apr 4, 2018 at 7:38 AM, bansheee1337 via grpc.io <grp...@googlegroups.com> wrote:
is it somehow supported in gRPC itself or are there any best practices to just allow a single client connection on a gRPC server? Assuming I have a server where multiple, especially interleaved client access doesn't make sense, how can I prevent this from happening? I can also think of some sort of simple self-implemented user management where the client generates a unique ID and registers itself with the server which then blocks all other accesses until the client deregisters again.

The answer may vary from one programming language to another, but at least in Python there is a max_concurrent_rpcs parameter available on server construction.
-N

banshe...@googlemail.com

unread,
Apr 8, 2018, 6:47:44 AM4/8/18
to grpc.io
Sorry, I didn't clarify but I'm using C++ and it doesn't seem like the API provides such a parameter.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages