2012-04-20 133 views
0

WCF路由備份列表中是否有可能在客戶端定義一個WCF備份列表,從而使單點接觸一個路由服務是不是nessasary?在客戶端

我有兩個服務實現相同的接觸(接口)。如果第一個服務不可用,我希望客戶端知道要使用備份服務。

這是可能的,或者我要創建一個路由服務客戶端將與通信(單點接觸)?

<client> 
     <endpoint address="http://localhost:49192/OrdinaryCustomerService.svc" 
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomer" 
      contract="OrdinaryCustomerServiceReference.ICustomer" name="OrdinaryCustomerService" /> 
     <endpoint address="http://localhost:49860/PremiumCustomerService.svc" 
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICustomer" 
      contract="PremiumCustomerServiceReference.ICustomer" name="PremiumCustomerService" /> 
    </client> 
    <routing> 
     <backupLists> 
      <backupList name="CustomerBackupList"> 
       <add endpointName="PremiumCustomerService"/> 
      </backupList> 
     </backupLists> 
    </routing> 

回答

0

只是一個想法,但我也有類似的問題,我一直在思考客戶(在我的情況下,IIS Web服務器)上創建一個路由服務,以便在Web服務器上的所有請求,可故障切換到不同的網絡服務。我們也有多個網絡服務器故障轉移,所以我會在每個路由器。

不理想,但最好的解決方案我已經發現迄今。如果IIS盒子上的路由器出現故障,IIS也將停機,因此我們的系統無論如何都會將其踢向其他網絡服務器。

我們也有適當的備份路由器WFC我們中間的%1,但它是之前的WebService手動更改處理這個問題。