Friday, June 18, 2010
If you are new to WCF routing services I recommend reading this.
Steps to run the and test the source code. (You need VS2010 to run and test this application)
Source code contains
1) Two normal WCF services : Air service ( Air.svc) and Road Service (RoadService.svc)
2) One Routing Service : RoutingService.svc
3) Console Client: This call the routing service.
To test this application first run all the three services by right clicking and selecting view in browser for each of these files i.e Air.svc, RoadService.svc and RoutingService.svc. As you can see in the configuration of routing service RoadService is your primary endpoint which means all the request should go to road service which you can verify by seeing the out put (in console client application) as “Travel by Road”. Now You stop the RoadService to simpulate the failover scenario, you will see that requests will automatically be going to AirService (which is your backup service incase of failover) which again you can verify y seeing the output.
In real business failover scenario these two service endpoint will be pointing to the same service, but here they are different services (Road and Air) just to test the failover.