Multiple connections and connection pooling in golang

what is the best practice for dealing with handler in golang via dgo?

do i have to initiate respective grpc to server on every handler on my webserver?
or do i initiate a grpc connection to server, and reuse the same grpc for multiple handler via dgo client?

sample code:

You don’t need to create a new connection for every request. You can just create one connection, and use it for many concurrent requests.

hi @mrjn

so i initiate a grpc on server, then

dgo.NewDgraphClient(...)

in handler?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.