.NET IHostedService, difference between 1 host for all and 1 host per hosted service

I'm writing a PoC that deals asynchronous messaging and event sourcing. So the set up is like this:

  • I receive a command trough my WEB API.
  • This command is put on my bus to be dealt with in an asynchronous way by a hosted service
  • When the command is treated, it results in an event being stored on my event store.
  • I have a 2nd hosted service that subscribes to my event store so that it can build readmodels from those events.

As you can see, I have 3 possible hosts: the WEB API, the message handler, the event listener.

I atleast need 1 host, which is the WEB API ofcourse, being my web host, now for the 2 hosted services, I have 3 different possibilities:

  • Register them in my web host ( seems less interesting to me ? )
  • Write a second IHost, that will host both the services
  • Write an IHost for each.

Like I already mentioned, the first approach seems the less correct, as I'm sure the web server host get's dealed with in a specific way, I just can't seem to find any documentation about the difference between 2 & 3.

Thank you !