I created a fig/docker links based version from your example

I really liked your example, and it was very helpful.  I am not sure you want to pull my changes in, but here is a slightly different take on your example (which retains your license, and links to your version as inspiration). It uses a simple sinatra app to serve the server.  It then uses docker links to link the proxy and N servers.  The proxy.rb script harvests the /etc/hosts for its 'server_\d+' entries to configure the proxy.  I use fig to scale up the N servers and then launch a single proxy.  Thanks for your inspiration, and I hope that my take on it is informative.