fabric

Load Balancing

Microservices in Microbus are lightweight goroutines that pull (consume) messages off a messaging bus, in which a queue is maintained for each endpoint of each microservice. Replicas of the same microservice subscribe to the same queues and consume messages as they are published. Load balancing is achieved by virtue of the bus dispatching messages from the queue to only one random consumer at a time. A separate load balancer is therefore not required.

Microbus also allows for multicast subscriptions in which all replicas receive all messages.

When using the Connector’s Subscribe method directly, multicasting can be enabled via the sub.NoQueue() option.

When using service.yaml and the code generator, the queue: none property is used to indicate a multicast subscription.

Events are by definition multicast.