1

I have client-server app. Client is a .NET 4.0 app. Server is stateless WCF (.NET 4.0) service. WCF service does some CRUD with SQL Server 2005 database. WCF is configured to support transactions. Services should be stateless for the sake of scalability. There are several instances of WCF service on different physical machines. They are behind the load balancer. If we have the following code of the client:

using (var scope = new TransactionScope())
{
  var proxy1 = new WCFServiceProxy();
  proxy.DoSomeDBStuff1();
  proxy.DoSomeDBStuff2();

  scope.Complete();
}

these two service requests may be served by different instances of WCF service. Will these transactions work a proper way?

Pavel Surmenok
  • 4,584
  • 4
  • 30
  • 33

1 Answers1

2

They should work properly. Transaction's 2 phase commit should work across different machines, regardless if they are under the same load balancer or not.

Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
  • Thanks! You are right. I have made a prototype (1 client, 2 servers behind the load balancer), and everything is OK. The problems are being appearing when I've tried to use WS-Atomic (instead of OleTx): it requires SSL, and WCF configuration is sophisticated when servers are behind the load balancer. But right now OleTx is good enough for me. – Pavel Surmenok Aug 23 '12 at 05:48