Sunday, 22 August 2010

More WCF and IIS

So spent a few weeks playing with wcf 4 and both windows and iis hosting, i have a nice lite config pattern making some use of wcf 4's configurationless features and extending it all to make use of code defined settings.
I have to say i like the use of the new proxy and host changes, made getting a clean pattern together nice and easy (I have found the default bindings rarely provide sufficient control within an enterprise environment).
IIS osting for straight services works best with http bindings, WAS supports the use of TCP, and although more reliable than msmq, its still messy to get working properly (im not and have no intention of being an iis expert). and why use tcp over http really, you can fully configure binary transmission, and security in http, in addition to ssl and lets not forget IIS ARR routing (love shared config and ARR load balancing).
msmq is a bit different, played in iis and got it working. even put a service pattern in place that allowed the use of arr, but fiddly, messy and unreliable, which brings me on to a point...
MSMQ is all about safety, I see a lot of posts about how to get high performance out of msmq, and why, if you need performance use tcp or http services. msmq is about getting a message from a to b with high reliability, so who cares if it takes a couple of seconds longer (i will reject any code i review that doesn't use durable messages). Throttling is a great idea, allows you to control load easily, and prioritising is an anti pattern, there is a chance a low priority message will never get processed so why would you take the chance. So best bet is wcf with net msmq binding, hopsted as a windows service (your boxes should always be active passive at the very least). if your msmq architecture is overloading your boxes, split yp the services on to different boxes, reduce throttling caps otherwise your architecture is wrong.

No comments:

Post a Comment