1
votes

We have used an Azure Service Bus relay REST Service to expose our internal WCF webservice to external customers.

Functionally all good, but we have noticed that it's significantly slower than connecting directly to WCF end point. I would have thought that Azure Service Bus just relays the internal endpoint without introducing any performance bottleneck.

Could someone please share what are the things to consider (in terms of performance) for Azure Service Bus? Any hints on how we can optimize the performance will be great.

The Service Relay REST Service is 16seconds slower than connecting directly to WCF Service. I noticed the main bottle neck is between Service Bus and Internal WCF call.

1
Can you be more specific when you say it is slower than connecting directly to the WCF endpoint? Do you mean if you point a client at the WCF endpoint internally rather than at the Service Bus endpoint with both the client and the service inside your network? If so, then it being slower doesn't surprise me given that with the service bus you'll have the latency of going out of your network to the relay, then the communication back in. How much "slower" is it? Can you quantify?MikeWo
Hi MikoWo, the Service Bus Relay is 16 seconds slower than direct call to WCF service.Nil Pun

1 Answers

1
votes

1) If your clients are using ChannelFactory, then cache the channels.

2) Is your endpoint on a data center near you and your customers? If not, I would highly suggest you change that.

3) According to the docs, if you are using NetTcpRelayBinding you can also set the TcpConnectionMode to Hybrid, which will establish "direct connections between two parties that sit behind opposing Firewalls and NAT devices"