A quick clarification on HYBRID connectivity mode in Windows Azure Service Bus

When you use Service Bus in Windows Azure, you can choose a no. of bindings among which one is NetTCPRelayBinding. What NetTCPRelayBinding offers you is ConnectionMode using which you can set how the client server will communicate.

You get two choices,


(From MSDN)

Relayed – all communications between the service and client applications use the Service Bus.

Hybrid – the initial connection between the applications uses the Service Bus. However, if the two applications can connect to each other, they will attempt to do this. If at any time this connection is lost, the applications will revert to communicating through the Service Bus.


Now the important thing to note here is that in Hybrid connectivity mode direct socket connection is dependent on time coordinated port prediction and as the above MSDN Link points the success rate is lower when your NAT is busy. More information here.

Another important point to note here is that once the direction socket connection is established and if it later fails for whatever reason the connectivity doesn't seamlessly fall back to relayed. The client application must retry in this case. But if this appears to be a recurring behavior due to a busy NAT then the chances are that direction socket connectivity will not work in your environment and repeated retries will cause performance issues. Hence you should set your connectivity mode to relayed in such case.


Comments (0)

Skip to main content