In client-side discovery, a service consumer, before making a request, first gets the location of a service instance by querying a service registry, which knows the locations of all the active service instances for the particular microservice requested.
One of the famous open-source implementations of a service registry pattern is Eureka, which was developed by Netflix.