Microservices into C# World ?

A bit of background about microservices via Martin Fowler. Some really cool stuff regarding patterns via Microservices.io.

Microphone allows you to run self hosting services using either WebApi or NancyFx ontop of a Consul.io cluster.
You can find the code here https://github.com/rogeralsing/Microphone

Consul is a system that does service discovery, configuration management, and health checking for your services. Services can register themselves using either a REST API or via DNS, and if a service becomes unresponsive, Consul can mark this service as unavailable and not include it in any search results.

You can start consul service with below line on console:

Check service health on Consul agent:

Check all services registered on Consul agent:

Discovery service output:

Time to play with some code.

Reference: Microservices discovery for .net