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.
- The request pipeline: how a request walks its nodes, with state diagrams for the request, the node and node health.
- Metrics: the
Meterfor what sits above a single HTTP request, and which metric to look at for what. - Zero-copy streaming with
System.IO.Pipelines:PipeResponseandPostData.Pipe*for large payloads. - Moving from 1.x to 2.0: behaviour changes and the public API that tightened.
- Release notes