The concept of a port in Microbus
can mean one of two things: a real TCP port, or a virtual emulated port.
Microbus
uses actual TCP ports for a few use cases.
The HTTP ingress proxy listens for incoming HTTP requests on one or more TCP ports, by default :8080
. A public-facing HTTP ingress proxy in a production setting will most likely be configured to listen on the standard HTTP ports :443
and :80
.
Similarly, the SMTP ingress proxy listens on port :25
for incoming SMTP messages.
All microservices connect to the NATS messaging bus, by default on port :4222
. Microservice exchange messages with other microservice over this bi-directional multiplexed connection.
Telemetry is pushed to via OpenTelemetry on ports :4317
(gRPC) or :4318
(HTTP) to Grafana. The UI of Grafana is exposed on port :3000
by default.
Microservices communicate with each other using an emulation of the HTTP protocol that includes the concept of ports. Real TCP ports are not opened. Rather, the virtual port number is made part of the bus subject on which microservices listen for messages.
By convention, some of these internal ports have a special purpose.
Port :888
is reserved for the control plane.
Endpoints defined on port :443
or :80
are typically considered public and exposed by the HTTP ingress proxy to external users.
Port :444
is used by convention for endpoints that should remain internal. Any port not exposed by the ingress proxy would serve the same purpose.
Port :417
is the default port used for events.
An endpoint that subscribes on port :0
receives messages on any port.