7

I would like to give my users their own subdomain like jack.example.com, james.example.com, and is using wildcard DNS record to do that.

But now I would like to separate users into multiple servers, like users A~J is on server A, and users K~S is on server B...

Is there a way to do this?

3

A wildcard DNS entry is a catch-all. There is no way to point half of a wildcard entry to one server and half to another.

You could individually list DNS entries for half your users and have them sent to one server, and then send the rest to another server.

You could also employ a load balancer that handles all the traffic and then sends the traffic to various servers.

| improve this answer | |
0

You could do this first by hand with already registered users, sort them to different servers, and with new registrations, having a script based on username to store data on selected server.

| improve this answer | |
0

If your goal is simply load balancing, as Stephen's answer suggesting. However, per the DNS and BIND 9 specifications, you can configure your DNS server to perform a round robin through multiple servers. Using this approach, you could enter each of your destinations and the DNS server would return different IP addresses by round robin.

| improve this answer | |
-1

Dns set to the wildcard as:

  • a*.example.com -> ip server 1
  • b*.example.com -> ip server 2
  • c*.example.com -> ip server 1
| improve this answer | |
  • 1
    You can not do wildcards like that in the DNS. * can only be a label by itself and matches everything. This was already spelled out in Stephen's reply almost one year before this one. – Patrick Mevzek Apr 6 at 17:55
  • DNS does not have this functionality, unfortunately. – Maximillian Laumeister May 8 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy