title: Running multiple instance microservice using spring cloud config
body: <p>I am developing a <strong>microservice, using <a href="https://projects.spring.io/spring-boot/" rel="nofollow noreferrer">Spring Boot</a></strong>, that exposes REST Endpoint. </p>
  
  <p>To meet the scalability constrains, <strong>multiple instance of the [same] service</strong> will be deployed (basically scale up when needed and scale down when not needed). </p>
  
  <p>I am using the <strong><a href="https://cloud.spring.io/spring-cloud-config/spring-cloud-config.html" rel="nofollow noreferrer">Spring Cloud Config Server</a></strong> to supply the configuration (such as port to bound, and other configurations) to this service. </p>
  
  <p><strong>Since the service exposing REST api, How can configure the config server to supply a unique port to each instance of the microservice?</strong></p>
  
  <p>One possible solution could be, running the service in individual machine/VM or create a docker container and deploy the service. This could be my solution if there is no way to supply random port to the service from cloud config server.</p>