I am trying to create an hosting service for websites basically using multiple machines. Then, when a user creates a website, I give him a random identifier (ex: "a4589", "pu8we" and so on) used as a subdomain.
Then, because I will have multiple physical servers, I was wondering to create a record in the DNS for each subdomain. More or less like these records:
a4589 A 192.168.0.23
pu8we A 192.168.0.23
az336 A 192.168.0.25
z012p CNAME ec2-89-65-36.amazon.com
But it will create many entries (thousands of entries) and I am not sure about the resilience of such solution. The main advantage is the capability to switch from a server to another with some transparency.
Have you some ideas to do this another way or do you think this solution is correct? Using virtual hosts on the final machines (Apache servers) is of course the last part of the resolution (I give this precision due to a comment made on this question).