Introduction to Consul Made Simple

Reemi Shirsath
2 min readJul 8, 2020

--

A distributed, highly available, service discovery, datacenter-aware, configuration system is known as Consul. It helps clients with up to date data views of their infrastructure. Consul supports proxy as well as the native integration model.

Consul is a distributed, highly available system. Consul is modern and elastic infrastructures and designed for both the DevOps and application developers.

Consul provides feature such as:

  • Service discovery
  • Tagging
  • Health checks
  • Secure Service Communication
  • Multi Datacenter
  • System-wide key/value storage

The architecture of Consul:

Every node runs the Consul agent once service is provided to Consul. This agent is responsible for the health check-ups of the node and of the services on the node.
Discovery of other services, getting key/value data, setting key/value data does not require to run the agent. The agents communicate with one or more Consul servers. The consul server is responsible for storing and replicating the data.

To avoid failure it is always preferred to use 4 to 5 servers. The catalog which is an aggregated information submitted by agents is maintained by the server. A high-level view of the cluster is maintained by the catalog. This includes details about services, nodes, health information, etc.

When there is a requirement for any component of your infrastructure that needs to discover other services, nodes can query the Consul server or consul agents. The query is then forwarded to server through agents automatically.

Each data center runs a cluster of Consul servers. The local Consu servers forward the request to the remote data center and return the result when a cross-data center service discovery, configuration request is made.

Two-Step to Install Consul:

  1. Download the Consul software (binaries are provided for 32-bit Linux, 64-bit Linux, Mac OS X, and Windows).
  2. Unzip the downloaded file and save it to a location of your choice.

Consul is a service mesh solution providing a full featured control plane with service discovery, configuration, and segmentation functionality. Each of these features can be used individually as needed, or they can be used together to build a full service mesh.

Reference: https://www.consul.io/intro

--

--

Reemi Shirsath
Reemi Shirsath

Written by Reemi Shirsath

𝘾𝙊𝙊 @ 𝙂𝙤𝙡𝙖𝙣𝙜 𝙎𝙥𝙚𝙘𝙞𝙖𝙡𝙞𝙨𝙚𝙙 𝘿𝙚𝙫𝙚𝙡𝙤𝙥𝙢𝙚𝙣𝙩 𝘾𝙤𝙢𝙥𝙖𝙣𝙮- Scalent.io

Responses (1)