Patterns · Service Discovery

Service Discovery

Patterns for services to find each other dynamically in environments where instance locations change constantly. These enable auto-scaling, rolling deployments, and health-based routing.

Service Registry

A database of available service instances and their network locations. Services register on startup and deregister on shutdown; clients query it to find instances.

Self-registration

Service instances register and deregister themselves with the service registry, sending periodic heartbeats to keep their registration alive.

Server-side Discovery

A load balancer or router queries the service registry on the client's behalf, removing discovery complexity from clients entirely.