BT

Dynamic Endpoint Discovery for WCF 4.0

by Jonathan Allen on May 18, 2009 |

In a disaster and recovery scenario, the machine that hosts your essential services may crash or otherwise become unavailable. While a hot failover may be available, that often requires either broadcasting an updated DNS entry or a pre-configured load balancer. But what if it didn’t have to be that way? What if client applications could simple ask “Who supports contract IFoo?” and automatically resolve address and binding information.

With WCF 4.0’s dynamic endpoint discovery features, that becomes possible. Based on the WS-Discovery standard, services can now use the “udpDiscoveryEndpoint” to broadcast the existence. Applications can then use the DiscoveryClient API to find services that implement a given contract.

Once the address is found, you still need the binding information before you can start making calls to the service. This can be done with the MetadataResolver, an API that has been around since the beginning of WCF. Like endpoint discovery, this is based on a Web Services standard, specifically WS-MetadataExchange.

Building on top of this is the AnnouncementService. This allows clients to be notified when a service goes online or offline. Combined with dynamic discovery, sophisticated load balancing and failover designs can be developed.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT