I am wondering what would be the best choice: hosting a WCF http service in IIS or creating a website in IIS and using a HttpModule in it to handle requests?
Or perhaps host the WCF http service in a windows service?
The service/httpmodule only logs the body text of incoming post messages, returns nothing.
Good performance for e.g. 300 posts/sec. is crucial.
Whichever way you go, I’m pretty sure that any sort of logging will slow down performance on the server. If you average 300 requests per second, you have that number of threads per second competing for the log file. Some threads will have to wait to get access to the log file, and if enough get queued up, there will be a big delay.
That said, the performance difference between the two would be insignificant – you should make your decision based on your familiarity with the technologies.
WCF does have in-built diagnostics functionality so that you can log messages without writing code (see MSDN), but it takes a bit more effort to learn WCF. The advantage of this is that if you notice logging affecting performance too much, you can turn it off without rewriting the application.
Is your application only logging posts and not doing anything else at all? If so, I would recommend using a database (SQL Server, mySQL etc) instead of the file system – this will deliver much better performance.