What is correct way to connect AWS instance of OpenSearch?

I think connecting part is poorly documented (or I could not find it - google takes me to broken elastic search documentation, which is readable only when using google cached version) and from some of the evidence I’m afraid we’re using it wrong in current project.
Currently we’re doing it like this:

var connectionPool = new SingleNodeConnectionPool(new Uri(url));

var connectionSettings = new ConnectionSettings(connectionPool)
    .BasicAuthentication(username, password)

var client = new ElasticClient(connectionSettings);

and the mysterious part is connection pool creation.
From AWS documentation, I understood, that in front of their OpenSearch cluster there’s load balancer, which basically hides nodes behind him, meaning that I have single address that I use when configuring client. And that would be great, if I would not see sometimes following in logs:

Node {	
   DeadUntil: 2022-09-05T16:20:15.6225674Z
   FailedAttempts: 5
   Uri: https://vpc-my-open-search-domain.us-east-2.es.amazonaws.com/

So, node is marked as Dead and Uri is from load balancer. Interestingly enough, documentation in elastic search cached docs version says: “Single node connection pool doesn’t opt in to sniffing or pinging behavior and will never mark nodes dead or alive.”
So may be it marks node as DeadUntil, but actually ignores this property and I can sleep well during the night?
Or may be I need somewhat differently connect to AWS OpenSearch instance?

On the side node I could not figure out how to create tag for opensearch-net, I did not found such in given list.

What do you mean by creating a tag for opensearch-net? Are you talking about resource tagging?

I see what he means. There is a Tag for what must be every other Client language, not for .Net I just entered a .net question under the general tag…

Hi @dziedrius,

Just wanting to clarify, are you using the opensearch-net client, as your code example has ElasticClient which is the elasticsearch-net client?

You are correct that documentation for the client needs improvement and is something we’re working on, we’re also open to PRs or issues on GitHub if you wish to contribute.

To the best of my knowledge and investigation, the SingleNodeConnectionPool does indeed ignore the IsAlive & DeadUntil flags, always nominating its single node for routing a request. ie. a request will always be attempted to be sent to the node regardless of any prior failures (upto retry limit on a given request). So while it may not impact future requests, the fact you’ve had several failed requests may warrant investigation for why requests have been failing.