If you use a load balancer for multiple instances of a microservice, configure the address of that load balancer in the Discovery Service.
Procedure
- Access the config\ folder of your Discovery Service installation (if you have scaled out the Discovery Service itself, any instance will do).
- Copy cd_storage_conf.xml to the location of your Capability registration tool.
- Open cd_storage_conf.xml for editing.
- In the
ConfigRepository section, find the Capability that represents the microservice you have scaled out.
- Set its
Url attribute to the URL (virtual IP address or host name, followed by a colon, followed by a port number) of the load balancer.
- Save and close cd_storage_conf.xml.
- In a command prompt, run the following command:
java -jar discovery-registration.jar update