solana-go-sdk icon indicating copy to clipboard operation
solana-go-sdk copied to clipboard

creating a client

Open scottywm opened this issue 2 years ago • 3 comments

When creating a client to query the solana blockchain as below, can I create a new client for each request coming into my server or should I create just the one client and reuse it?

c := client.NewClient(rpc.MainnetRPCEndpoint)

What method is best?

scottywm avatar Oct 23 '22 14:10 scottywm

this is not a team who are trained with your library, i dont know why you referred me there.

scottywm avatar Oct 24 '22 08:10 scottywm

It depends. The main point is the http client. I'll say you can do whatever you want before you encounter a performance issue.

yihau avatar Oct 24 '22 08:10 yihau