Dynamically define upstream

Hey there,

Is there a way to dynamically configure nginx upstreams - with API or
via Lua?

Much appreciated!

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