File size

File size

File size

File size

File size

227.0 B

When people ask about new things for WCF in .NET 4 there are several but two of the big ones are discovery and routing. Last time we covered discovery. On this episode we are going to talk about routing. Suppose for example you want to do something
simple like create a backup URI for your service in case the primary server is down. Routing can handle this simple case and much much more.

It's not out of the box, you're right. The main reason why is that the Routing Service is designed to be stateless, and most intelligent load balancing methods rely on some knowledge of "how many messages" or "how much traffic" has been sent a certain direction.
While it's possible to build stateless load balancers, it's not immediately apparent how to do this within the Routing Service.

Over at the blog I'm going to be addressing the load balancing question fairly soon. In the meantime, take a look at the "Advanced Filters" sample
over on MSDN. One of the advanced filters we build is a Round Robin filter. Note: I don't recommend using this sample, as it has all sorts of issues with locking. In the blog I'll
explain why this isn't the best design (it's included in the sample as an example of a custom filter) and give you a better solution (hint: the Routing Service utilizes a MessageFilterTable<IEnumerable<ServiceEndpoint>>).

Remove this comment

Remove this thread

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums, or
Contact Us and let us know.