A .net C# library and web api keeping a list of service instances by resource that removes instances as they go out of service.