markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

Multiple Elasticsearch Target Urls #120

Closed hmlmartins closed 4 years ago

hmlmartins commented 4 years ago

Hello,

This more of a question than an actual issue, but I could not find anywhere else to present this doubt I am having.

Given the possibility to have multiple elasticsearch urls in nlog config, how are these managed? It will always send requests to both targets? will it detect if the node is available, and forward to the first available node? will it balance between node urls?

Thank you,

markmcdowell commented 4 years ago

Hi, if you specify multiple urls it'll use a Static Connection Pool that will ping the nodes to make sure they're healthy. It can issue requests against any healthy node.

hmlmartins commented 4 years ago

Thank you for your reply. Should be enough to get me going and to understand how to "balance" connections to our cluster.