A load balancer or a proxy needs the list of endpointsOne IP address and port that a service gives, with its load balancing weight. See HTTP API. behind each service, and that list lives in many places, such as
DNS,
Consul, the pods behind a Kubernetes Service, a text file kept by hand, or an inventory served over HTTP. Teaching each
client every one of those sourcesWhere a service reads its endpoints, one of dns, file, url or kubernetes. See Services and sources. means as many integrations to write and
to keep working.
Vigie reads the endpoints of each service from one source and serves them all the same way. A client asks for a service
by name with GET /services?service_name=<name> and gets a JSON list of endpoints, each an IP address and a port with
its
weight, whatever the source behind it.
Four sources
DNS records (A and AAAA, SRVA DNS record giving the host, port and weight of one instance of a service. See Read endpoints from DNS., or TXT), a local file, a list served over HTTP, or the ready endpoints of a Kubernetes
Service. Consul is read through its DNS interface.
One small answer
Every service answers with the same JSON list of ip, port and load_balancing_weight, which any HTTP client can
poll.
Cheap to poll
Vigie caches each answer for a few seconds and reads a source once for all the clients asking at the same time, so
many pollers cost one lookup.
Reload without a restart
SIGHUP or POST /reload reads the file again. An invalid file is refused, and the previous services stay in
service.
The agents of Flock poll Vigie for the endpoints of their backends with an eds
block, and meridian reads the same answer. Any other client that can send an HTTP request and parse JSON can do the
same.