The Consul Agent Flashcards
In production you would run each Consul agent in either in _ or _ mode
server
client
Each Consul datacenter must have at least one _, which is responsible for maintaining Consul’s state.
server
Consul’s state includes information about _, _, _
other Consul servers and clients
what services are available for discovery
and which services are allowed to talk to which other services.
In order to make sure that Consul’s state is preserved even if a server fails, you should always _
run either three or five servers in production.
The __ number of servers (and no more than _ of them) strikes a balance between _ and _.
odd
five
performance
failure tolerance
A client is a lightweight process that _ (1) (2) (3).
registers services, runs health checks, and forwards queries to servers
A client must be running on every _ in the Consul datacenter that runs services, since clients are the source of truth about _
node
service health
Consul uses your _ as the default node name. If your _ contains _ DNS queries to that node will not work with Consul. To avoid this, explicitly set the name of your node with the_flag.
hostname
hostname
periods,
-node
Check the membership of the Consul datacenter by running the_ command in a new terminal window. You can discover additional metadata by providing the_ flag.
consul members
-detailed
The_command runs against the Consul client, which gets its information viagossip protocol. The information that the client has is eventually consistent, but at any point in time its view of the world may not exactly match the state on the servers.For a strongly consistent view of the world, _, which forwards the request to the Consul servers.
members
query theHTTP API,
Stop the Consul agent by using the_ command. This will gracefully stop the agent, causing it to leave the Consul datacenter and shut down
consul leave
When you issue theleavecommand, _ datacenter. When an agent leaves, its local services running on the same node and their checks are _ and Consul doesn’t try to _
Consul notifies other members that the agent left the
removed from the catalog
contact that node again
Forcibly killing the agent process indicates to other agents in the Consul datacenter that _. When _, its health is marked _, but it is not _. Consul will automatically try to _, assuming that it may be unavailable because of _, and that it may be coming back.
the node failed instead of left a node fails as critical removed from the catalog reconnect to a failed node a network partition
If an agent is operating as a server, a graceful leave is important to _. Check theAdding and Removing Servers tutorialfor details on how to safely add and remove servers.
avoid causing a potential availability outage affecting the consensus protocol