Module which adds new upstream host and port

Module which adds new upstream host and port to pool. How it should be
done?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227797,227797#msg-227797