This is a great video from Ashish (Principal Design Engineer at Citrix Systems) explaining how does XenApp application delivery process work. Ashish explains different servers involved in the process and then he dives into health recovery and monitoring feature. If you want to understand how HMR prevents blackhole problem then this is a great video to watch.

If you are interested in writing custom HMR test then visit CDN page here