Multiple clients, one go process

I read in multiple forum posts that the client library is single threaded. Many people recommend having multiple process to increase parallelism to fully utilize the cluster.

How do I create multiple clients in one go process? I tried to make multiple instances of Database object for this, but that panics. I’m guessing maybe because startNetwork gets called multiple times?

Any help would be appreciated,
Thanks.

Running multiple network threads (i.e. our client library thread) in one process is currently unsupported. In order to run additional network threads, you’ll need to start them in separate processes.

1 Like

Thanks for the quick reply.

Is there any timeline on when this feature could land?

Hey @zozos, I finally turn to this repo fdb-test-cluster if you are using AWS for the IaaS provider.

I don’t think there is, as I’m not aware of anybody that’s currently working on this. It’s not something we’ve put much priority on since we haven’t found running one process per client to be too onerous so far.

As always, pull requests are welcome! :slight_smile:

Our contribution guide is online, and I’m sure folks here could help mentor anyone who wishes to open a PR.