Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 2.06 KB

scale-out.md

File metadata and controls

29 lines (18 loc) · 2.06 KB
title summary reviewed related
Scale out
Information on scaling out the NServiceBus Gateway
2021-08-12
samples/gateway

Due to specifics of the protocol used, the gateway is designed to run on at most one instance of each endpoint. Depending on the transport there are different strategies for designating a gateway hosting endpoint instance.

MSMQ scaled-out with the distributor

When scaling out MSMQ through the distributor, the node running the distributor is the natural candidate to host the gateway. Running the distributor as a failover cluster provides high availability. No special action needs to be taken, other than configuring senders to send gateway HTTP traffic to the node running the distributor instead of directly to the workers.

Gateway with distributor

Brokered transports - RabbitMQ, SQL Server, Azure and MSMQ scaled-out with unified scalability model

With brokered transports or bus transports with sender-side distribution, all instances are equal. All can host the gateway, but one instance must be explicitly selected as the receiver of the incoming HTTP gateway traffic. Any endpoints sending to the gateway of that endpoint must be configured to use the HTTP address of the selected endpoint instance.

Use an HTTP load balancer to avoid hard-coding individual endpoint instance gateway HTTP addresses in the gateway senders. Configure sending endpoints to send to the load balancer and let the load balancer forward the traffic to the HTTP address of the selected endpoint instance.

Handle high availability requirements by setting the load balancer to fail over to another endpoint instance if it detects endpoint failure.

Gateway with Version 6 scaleout

Caveats

Callbacks through the gateway are not supported on scaled-out endpoints.