Client Side Service Discovery
You set up client side service discovery by having your app query a service registry. The app gets a list of healthy hosts and picks one for the request. Engineering teams use this design to remove central load balancers from internal network paths. Still, broad registry roles let any app read the whole network map and reach sensitive services. How client side service discovery works in practice In a distributed system, backend instances start and stop all the time. Each time an instance star
AI-Assisted Vulnerability Discovery + Client-Initiated Backchannel Authentication (CIBA): the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up client side service discovery by having your app query a service registry. The app gets a list of healthy hosts and picks one for the request. Engineering teams use this design to remove central load balancers from internal network paths. Still, broad registry roles let any app read the whole network map and reach sensitive services.
How client side service discovery works in practice
In a distributed system, backend instances start and stop all the time. Each time an instance starts, its IP address and port change. A service registry keeps track of every active instance and its network address. When a backend service comes online, it registers its current location with this central registry. The service also sends regular heartbeat signals to prove it is still alive and healthy. If a host stops sending heartbeats, the registry removes that address from the available list.
When a client app needs to call another service, it talks to the registry first. The client asks for all healthy endpoints that belong to the target service name. The registry returns the current list of valid IP addresses and ports to the client. The client caches this list in local memory so it does not query every time. Next, the client runs a local load balancing rule, such as round robin. It picks one host from its local cache and sends the network request straight there. If that call fails, the client marks the host as bad and picks another one.
Managing registry roles and client permissions
To keep this workflow safe, teams must lock down who can read and write records. Every service needs its own identity and a strict role inside the service registry. A payment service should only register its own address, not overwrite the user database record. Likewise, a front-end app should only read addresses for the specific backend APIs it calls. Teams set up access control lists inside the registry to enforce these read and write rules. Each client presents a token when it polls the registry for host updates.
Engineers also pair registry tokens with mutual TLS certificates for service-to-service calls. When the client gets an IP address from the registry, it opens a direct connection. Both sides check each other's certificates before any data moves across the network wire. This stops an unknown app from calling a backend host just by guessing its IP.
AI-Assisted Vulnerability Discovery + Client-Initiated Backchannel Authentication (CIBA): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native discovery solves and what it leaves open
Native client side service discovery solves the problem of finding dynamic hosts at scale. It removes extra network hops because traffic goes straight from the client to the server. It also removes a central load balancer that could become a single point of failure. Teams can scale backend clusters up or down and clients find new nodes right away.
Yet this native setup leaves a major operational gap for human engineers and automated scripts. Registry roles and network rules only decide which host can open a socket to another. They do not inspect what individual queries, commands, or requests do once the session starts. When an engineer troubleshoots a broken service, they often use broad admin keys to connect. Native discovery gives them the host address, and broad keys grant full database or shell rights. There is no native way to redact sensitive fields like emails or card numbers in flight. Teams also lack a clear audit log of each command run against dynamic backend instances.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How does client side discovery differ from server side discovery?
In client side discovery, the calling app queries the registry and picks a target host. In server side discovery, the app sends traffic to a router that picks the host.
What happens if the service registry goes down?
Clients keep a local cache of the last known healthy hosts in memory. They continue routing requests to those cached addresses until the registry comes back online.
Why does client side discovery create coupling in polyglot teams?
Every programming language needs a library to poll the registry and balance traffic. Teams using many languages must maintain and update these client libraries across every single service.
Related guides
In this post