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?

Patrick Mevzek
  • 8,375
  • 1
  • 20
  • 42

4 Answers4

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.

dan
  • 15,123
  • 11
  • 44
  • 52
Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
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.

Trebor
  • 3,270
  • 8
  • 25
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.

lucasf991
  • 33
  • 3
-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
Patrick Mevzek
  • 8,375
  • 1
  • 20
  • 42