Skip to content

Clarifying proper usage of grpc client connection #158

@badoet

Description

@badoet
  1. Does grpc-node automatically support connection pooling?
    e.g. const sessionService = new client.Sessions(serviceURL, grpc.credentials.createInsecure())
    calling this new client.Sessions multiple time will it automatically bind it to the same channel underneath? or will it create multiple channels?

  2. Do we need to close client connection after use?
    e.g. if i dont call sessionService.close() after usage, what happen to it?
    and if i create another sessionService without closing the previous will this mean it will just hold the connection open and cause memory leak?

  3. Is it common to get load balancing policy error due to the grpc server is restarted?
    i feel that we keep getting this error in our client because we never close the grpc connection and it just keep throwing this error Error: Call dropped by load balancing policy every time we restarted one of the grpc server.

any insight and input is appreciated. i cant find any information on this from the web and documentation.
I am pretty sure there are many people have the same question or face the same problem as us.
thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions