Search code examples
.netwcfiisself-hosting

Does a WCF self hosted service handle more or less load than the IIS hosted option?


Does the hosting option affects the amount of requests a WCF service can handle?


Solution

  • Hard to say - the main reason for self-hosting is probably having more control, e.g. being able to tweak the system as you need it.

    IIS hosting is convenient and easy to set up, and it offers "on-demand" loading of the service, e.g. the service host is only loaded if a request actually comes in.

    This constant loading (and unloading) of the service host will probably hurt performance a little bit - on the other hand, self-hosting a service host, you probably use more memory (since the ServiceHost is active and in memory at all times).

    So again - it's a memory-vs-speed trade-off - selfhosting uses more RAM but is probably a tiny bit faster.

    Marc