Connected concurrently to many clusters


#1

Hi,

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 ?

Thanks.


#2

@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.

-Jeff


#3

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) ?


#4

@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.

-Jeff


#5

Thanks,
I’ll give it a try


#6

@itay
Hi,

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

Thanks


#7

Hi @Eug,

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