I have an HttpModule that gathers some basic information on every Http request to an ASP.NET site. The module has to send this information for further processing to an external program (a windows service or a console app.) I am currently using a WCF service with named pipes (with a ChannelFactory). I have to say that it all seems to work nicely, perfectly, actually.
My main requirement for the HttpModule is superior performance and reliability. Is there a better way of doing such inter-process communication, especially within an HttpModule (on a highly loaded site). Are there any potential performance issues/bottlenecks ? :)
What do you think? any ideas or references for some reading on this topic would be highly appreciated!
Thank you in advance!
I'm assuming that the communication between Http Module and the data service is always on the same machine.
Performance: you're unlikely to beat Named Pipes, as they use shared memory for the transport. WCF adds a little overhead with its framing protocol and encoding scheme - you could pass your data raw over a pipe using the System.IO.Pipes types directly if you wanted to avoid the WCF overhead, but for many applications this is not worth the extra effort. If you stick with WCF, set the transport security mode to None as explained here.
Reliability: Named Pipes are objects managed by the OS kernel, and the WCF binding a fairly thin wrapper over them, particularly with transport security disabled: reliability is high.