Elastic.Transport

Elastic.Transport provides the connectivity components shared among the .NET Elastic client libraries: a request pipeline that is aware of the cluster and stays resilient when nodes drop in and out of rotation.

It was lifted from elasticsearch-net and is used across Elastic services, not only Elasticsearch. The transport fails over fast and in constant time. When a node is considered bad, it fails over immediately, provided the overall request timeout allows for it. Full incremental retry mechanisms are an explicit non-goal: they belong in the products and libraries that use Elastic.Transport.

You can use the library on its own, but it's typically the core of a client that models all the API endpoints:

var settings = new TransportConfiguration(new Uri("http://localhost:9200"));
var transport = new DistributedTransport(settings);

var response = transport.Get<StringResponse>("/");
var headResponse = transport.Head("/");
		

The package is Elastic.Transport on NuGet. The source and the full README are in the elastic-transport-net repository.