Live data from Hacker News

Service Discovery for a microservice with multiple ports

news.ycombinator.com

1–4 of 4 posts

Service Discovery for a microservice with multiple ports

#1
Is exposing multiple ports per service an anti-pattern?

Does it violate the single responsibility of a microservice?

How do you handle service registration and discovery for services with multiple ports?

Is IP per container with smart clients & SRV records the best way to tackle this problem?

Re: Service Discovery for a microservice with multiple ports

#3
post #2

I got inspired by Consul and srv records. I use different names for the protocols on each port, e.g. mqtt.mosquitto... websocket.mosquitto..

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?

Re: Service Discovery for a microservice with multiple ports

#4
post #2

I got inspired by Consul and srv records. I use different names for the protocols on each port, e.g. mqtt.mosquitto... websocket.mosquitto..

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?

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