Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is MSDTC a big resource drain?

Tags:

c#

msdtc

csla

So, Is MSDTC a big resource drain on a system (server & application)?

In the past, I have written several large scale web applications that rely on MSDTC for database transactions. I have never investigated how much of a drain that would be on the server.

Currently, I am working with CSLA framework and CSLA doesn't rely on MSDTC for transactions. It basically reuses the same connection object and executes all database commands within a TransactionScope object.

I guess I am looking for some arguments either way as to using MSDTC or not.

like image 237
Skadoosh Avatar asked Feb 22 '23 21:02

Skadoosh


1 Answers

MSTDC is used for distributed transaction. To simplify, using a TransactionScope can implicitely use MSDTC if the transaction needs to be distributed, ie: if the TransactionScope surrounds a piece of code that implies more than one resource. This is called escalation, and most of the time happens automatically.

So, yes it takes somes resources, but if you do need ACID transaction across multiple systems ("resource managers", like SQL Server, Oracle, or MSMQ for example) on a Windows OS, you don't have much choice but use MSDTC.

One thing about performance that can be done when configuration MSDTC, is ensure there is only one Coordinator for a pool of distributed resources, avoiding MSDTC to MSDTC communication. Configuration is usually the biggest problem you'll face with MSDTC. Example here: http://yrushka.com/index.php/security/configure-msdtc-for-distributed-transactions/

like image 154
Simon Mourier Avatar answered Mar 07 '23 19:03

Simon Mourier