Quantcast
Channel: Active questions tagged retry-logic - Stack Overflow
Viewing all articles
Browse latest Browse all 950

Nest retries when using multiple nodes behind load balancer

$
0
0

In the docs of Nest v7, we can find:

By default, NEST will retry a request as many times as there are nodes in the cluster, that the client knows about

I'm instantiating the ElasticClient as follows:

var connectionSettings = new ConnectionSettings(new Uri(configuration.BaseUrl))    .BasicAuthentication(configuration.User, configuration.Password)    .EnableApiVersioningHeader()    .ThrowExceptions();var client = new ElasticClient(connectionSettings);

The configuration.BaseUrl has the following format:

https://elasticsearch.service:9200/

It's basically an address to a Kubernetes service. Behind that service there are 4 replicas of elasticsearch.

I wonder, do retries work in this case? Does Nest discover that there are 4 replicas, and does it send up to 4 retries?

If it doesn't, what should I do to enable that? Do I need to expose each replica under seperate service and use that to initialize the client? Or maybe, should I just use Polly instead?


Viewing all articles
Browse latest Browse all 950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>