For a SaaS product i’m currently building, i’m looking for the best way to map a customers subdomain (or their own cnamed domain) to a specific origin server. I want to have multiple isolated backend clusters to spread load and to deploy them close to the user geographically.
The easiest solution would be to create a dns record per customer and point it to the right origin. But as far as i can see the number of records is limited and will not support 10000+ subdomains.
Is there another easier/better option i’m missing here?
The solution should support 10k+ customers/subdomains, 10-20 origins, custom hostnames, and the ability to move a customer to another origin.