Connected concurrently to many clusters



What is the best practice for a .NET app to connect to multiple CBDB clusters concurrently, querying a different cluster each time.
Can the app holds an array of "Cluster"s ?



@itay -

I am not 100% sure how the client would behave, but it should work as long as they have different instance names. The ClusterHelper won’t help here because it makes the cluster instance a singleton.



So for example:
Cluster ClusterA = new Cluster(configA);
Cluster ClusterB = new Cluster(configB);

ClusterA and ClusterB should co-exist and called interchangeably, including concurrently (in a different threads) ?


@itay -

Again, I am not 100% sure since we don’t explicitly test that scenario; but seeing that our QE test runners create an instance per thread and each handle runs concurrently, I believe it should work correctly.



I’ll give it a try



Can you please share your experience in concurrent (or interchangeable) access to multiple CBDB clusters?



Hi @Eug,

So far it seems to work.
I don’t know about memory or performance penalties.
Basically I use: