#name-service #service-discovery #name #dns #discovery #service #tokio


Name service implementation for abstract-ns that uses domain name system (DNS) run in tokio event loop

5 releases (3 breaking)

Uses old Rust 2015

0.4.0 Oct 19, 2017
0.3.1 Apr 24, 2017
0.3.0 Mar 20, 2017
0.2.0 Mar 1, 2017
0.1.0 Oct 15, 2016

#21 in #name-service

Download history 33/week @ 2024-03-10 25/week @ 2024-03-17 4/week @ 2024-03-24 57/week @ 2024-03-31 16/week @ 2024-04-07 21/week @ 2024-04-14 18/week @ 2024-04-21 23/week @ 2024-04-28 14/week @ 2024-05-05 16/week @ 2024-05-12 26/week @ 2024-05-19 19/week @ 2024-05-26 25/week @ 2024-06-02 6/week @ 2024-06-09 22/week @ 2024-06-16 15/week @ 2024-06-23

72 downloads per month


911 lines

Abstract Name Service

Status: Beta

Documentation | Github | Crate

This rust crate provides just abstract traits which may be used to build interoperable implementations of name dicovery.

We want abstract_ns to have implementations not only for DNS-based name discovery but also Zookeeper, Eureka, Etcd, Consul, and whatever other thing you might imagine. All of them easily configured and interchangeable.


  • Defines what is a name and what is a result of service discovery
  • Uses futures-rs for asynchronous stuff
  • Has interface to receive updates (name changes)
  • Allows some kind of name service routing, i.e. has a way to specify different resolvers for different names, for example: serve *.consul from local consul, other names from conventional DNS servers.

This repository also contains the following crates:

  • ns-std-threaded a name resolution implementation that uses stdlib resolver running in a thread pool
  • ns-dns-tokio an pure-rust implementation that uses domain crate to resolve domains asynchronously in tokio-core main loop

Note: abstract-ns v0.2 is very different product than v0.1


Licensed under either of


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


This crate provides a simple name resolver that based on domain crate

The domain crate is made as a one-stop thing for any DNS. Still abstract-ns provides subscriptions for updates and service discovery based on different services (and mapping between names and resolvers).

Use this crate:

  1. As a more efficient ns-std-threaded (with care!)
  2. For DNS-based name resolution (no SRV yet)


~149K SLoC