User1586472150 posted
I've written a native module which registers for the RQ_END_REQUEST notification, and implements the OnEndRequest event, and not OnPostEndRequest. I've used the starter sample as a base for the module.
It performs very little processing in the OnEndRequest event, calling the GetStatus API, then adding a custom http header using the SetHeader API.
I've also written a Managed module which does exactly the same thing - obvious difference being that the native module allows us to work at a server level, and not just a site level, which is ideally what we'd like.
Testing has shown significant performance issues with the native module. We're using JMeter to load test the module.
When applying the load tests the server with the native module installed proceeds without issue for approximately 5 seconds, then appears to "clog" completely. Throughput slows, and requests appear to start queueing and waiting.
The managed module on the other hand proceeds throughout the same test in a smooth manner, with no clogging or waiting.
Can anyone either point me to some background reading or give me an idea of caveats I should be looking for with this stuff, there's so little code involved here it should be trivial surely.....and as it's unmanaged (like the rest of the IIS stack) surely
it should perform better than the managed module?!?
edit: Are there any MSFT looking at these forums?