I've never done something so ambitious before so please let me know if this is simply a bad idea, and alternate solutions I should consider.
So I have three servers (and more later), all hosting sites with the same TLD. As it stands, I can't link a subdomain and a server. (There are more than one server because of different subscription levels and expected performance, etc.)
My ideal scenario is this: All web traffic hits a Varnish cache, and Varnish caches it from whichever server is hosting the site. I can use Apache or Nginx for the web servers, whichever is more convenient.
There will always be new sites being created on the web nodes, so I want my Varnish cache to know which site is where without having to manually enter them. (All the servers are on Debian.)
I have been considering Puppetmaster for this, but I can't find any documentation (maybe I'm searching for the wrong thing?). I've also been considering a custom daemon, but that seems like reinventing the wheel.
I could use Nginx as a caching proxy if it's more convenient, Varnish just seems more popular for this use case.
Thanks