3 ms·
Service Discovery for a microservice with multiple ports
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?
- weitzj 10y agoI got inspired by Consul and srv records. I use different names for the protocols on each port, e.g. mqtt.mosquitto... websocket.mosquitto..
- caspereeko 10y agoSo 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 10y agoI use TLS and SNi and have a public hostname for each port