
Service Discovery for a microservice with multiple ports - caspereeko
Is exposing multiple ports per service an anti-pattern?<p>Does it violate the single responsibility of a microservice?<p>How do you handle service registration and discovery for services with multiple ports?<p>Is IP per container with smart clients &amp; SRV records the best way to tackle this problem?
======
weitzj
I got inspired by Consul and srv records. I use different names for the
protocols on each port, e.g. mqtt.mosquitto... websocket.mosquitto..

~~~
caspereeko
So all services needs to talk to consul DNS to resolve these names, right?

How would you expose for example mqtt to public internet-facing in this case?

~~~
weitzj
I use TLS and SNi and have a public hostname for each port

