Usage pattern for ElasticsearchClient for multiple regions .NET

I have two different elastic deployments that are in two different regions. Both clusters exist under the same elastic org account.

Is the recommended usage pattern to create a singleton instance for each deployment? Or should I have one client and change the value of the api key and cloud id properties when I need to write to a corresponding deployment? I am reading on the best usage patterns and it is not clear to me if I should try to reuse the same Elasticsearch client or make one for each deployment.

If they are separate clusters then yes, you will need separate client instances.

1 Like

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