Reputation: 642
I have been reading about SignalR API
and trying to implement the same. I have created a MVC
web application which is a client to the SignalR Hub
. The client is a JavaScript
client. I have created the SignalR
Hub as a part of the same application. What I have learnt is that SignalR
could also be self hosted as an independent application. My confusion is that, does it make any difference if I separate it from my web application and host it separately? And are there any pros and cons to both the approaches.
Upvotes: 0
Views: 433
Reputation: 3334
It's up to you how you will organise your projects. I think there are some interesting points: https://learn.microsoft.com/en-us/aspnet/signalr/overview/deployment/tutorial-signalr-self-host:
Reasons for not hosting in IIS include:
- Environments where IIS is not available or desirable, such as an existing server farm without IIS.
- The performance overhead of IIS needs to be avoided.
- SignalR functionality is to be added to an exising application that runs in a Windows Service, Azure worker role, or other process.
If a solution is being developed as self-host for performance reasons, it's recommended to also test the application hosted in IIS to determine the performance benefit.
Upvotes: 1