Question

I have read some articles and watched some videos, but did not find a concrete suggestion when it comes to serving those micro-services. My understanding is that they should be served with their own application server.

My question is should they be deployed on different servers or it does not matter.

When they are served on the same server(computer) won't there be port conflicts?

Was it helpful?

Solution

I have read some articles and watched some videos, but did not find a concrete suggestion when it comes to serving those micro-services. My understanding is that they should be served with their own application server.

That is not really necessary. Frameworks such as Play and Spray do not need an application server.

See here - I quote:

You're also not going to find any true micro service based architectures that are hosted in an application server, that kinds of defeats the point. To this end micro services self host, they grab a port and listen. This means you'll lose any benefits your typical enterprise application server may bring and your service will need to provide some of the more essential ones (instrumentation, monitoring etc.).


My question is should they be deployed on different servers or it does not matter.

You definitely want to share servers to conserve hardware resources. Containerisation (see e.g. Docker and OpenShift) is quite a nice model.

When they are served on the same server(computer) won't there be port conflicts?

Not if you use Virtual IP addresses and bind to the VIP.

Alternatively, Docker has a different approach. It binds to a random port; then you could port forward that port on an "agreed" port for that service, to expose it to the outside world.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top