Jim,

Consider using Docker / Kubernetes or similar solution. That will handle
the load balancer via a Kubernetes service which provides a static IP and
the ports / internal IPs are masked from the user. They can use the IP or
baked in DNS to then access the containers running spring-boot etc. Docker
just announced similar functionality as part of the core Docker solution.
If using a service in Kubernetes you just label your containers so the
service knows how to map the generated / healthy containers to the static
ip.

Chris

On Tue, Jun 21, 2016 at 12:40 PM, Jim Talbut <[email protected]> wrote:

> Hi,
>
> I have a bunch of services (too many) that I need to make self-registering.
>
> At the moment most of these services are running as wars in tomcat, but
> I'm going to be moving them to spring-boot (running as individual processes
> using tomcat embedded).
>
> Some of the services are SOAP, others are REST.
>
> For each service I need to:
>
>  * Run the service on an unpredictable port.
>  * Identify the base URL for the service.
>    I'll need a consistent way to go from this to the WSDL or the
>    Swagger for the service.
>    I'll also need a consistent way to go from this to the JMX endpoints
>    for the JVM.
>  * Identify the service name, the domain (essentially just metadata for
>    the service) and the version for that service.
>  * Record the service details in a registry (probably Consul, but it's
>    not set in stone).
>  * Configure a load balancer (JetNexus) to use this URL for this
>    version of the service (creating the endpoint on the load balancer
>    as necessary).
>
> I know how to do all of this except for the first hurdle.
> I can't use publishedEndpointUrl because the port is unpredictable (there
> will be an unpredictable set of services running on any given box).
>
> I can get the servlet mappings, the port from Spring boot, and the JAX-WS
> (haven't tried JAX-RS) endpoint details, but am I going about this a bad
> way?
>
> What is the recommended way to derive the full URL for a service outside
> of the context of a request?
>
> Thanks
>
> Jim
>
>
>


-- 
Chris Riley, Partner
HKM Consulting LLC
(w) hkmconsultingllc.com
(o)  774.357.5900
(m) 508.273.3102
(f)   774.357.5905

Reply via email to