We've got a Java webapp. It's a simple .war file. We allow customers to sign up for our service and they get their own URL: http://customer_name.ourdomain.com which points at a special instance of our app just for them.
We've got the system up and running on a single server, but now we need to figure out how to distribute it. When the customers sign up they're going to get assigned to a particular server. We can handle that. What I can't figure out is how to get customer_name.ourdomain.com to point to the right box.
Because we let people sign up on their own, we can't manually add CNAME records to a DNS server to map the subdomain to an IP. Plus, I don't know if a DNS server can handle the tens of thousands of customers we hope to have some day.
Is there some way to do this dynamically? I expect we'll be able to store a subdomain/ip mapping in a mysql database somewhere. Is there a DNS server that can use it? Or is there a better load-balancer front-end traffic distributor that we should be using?