web-server-01).
Verify Cluster Membership
On one of the Consul servers (consul-node-a), confirm that all nodes have joined the cluster:
web-server-01) to define and register your service. You can watch these changes propagate instantly in the Consul UI:

Service Definition File
Onweb-server-01, create a JSON file to describe your service:
The
service.json file follows Consul’s service definition schema. You can extend it later with health checks under the "Check" block.Service Definition Fields
| Field | Description | Example |
|---|---|---|
| ID | Unique identifier for the service | web-server-01 |
| Name | Logical name of the service | front-end-eCommerce |
| Tags | Metadata labels | v7.05, production |
| Address | Service IP address | 10.0.101.177 |
| Port | Listening port | 80 |
Register the Service
Register your service definition with Consul:

Testing Without a Health Check
Stop the Apache HTTP server:front-end-eCommerce service still shows as passing because no application-level health check is defined.
Without a defined health check, Consul cannot detect application failures. Always configure checks to get accurate health status!
Deregister the Service
To remove the service from Consul:You can also deregister services via the Consul UI or the HTTP API by specifying the service ID.
front-end-eCommerce entry disappears from the Consul UI.