2

I have a Win 2k8 server that hosts multiple IIS apps that are under one domain, example.com. The need for a second server has increased and will need to get more servers to host my apps.

On my server, I have a *.example.com bound Default Website that does a simple redirect and several subdomains that have different purposes, such as foo.example.com. What will happen if I add the same configuration to another server (different apps, different subdomains). Is DNS smart enough to somehow route queries to the right subdomains to the right server?

So, I would go from:

SERVER1 (203.0.113.1)
    - Default: *.example.com
    - App1: app.example.com
    - App2: foo.example.com
    - App3: bar.example.com

TO:

SERVER1 (203.0.113.1)
    - Default: *.example.com
    - App1: app.example.com
    - App2: foo.example.com
    - App3: bar.example.com
SERVER2 (203.0.113.2)
    - Default: *.example.com
    - App4: baz.example.com
    - App5: qux.example.com

Is this possible? Do I need some special configuration or will this work automagically?

Joel Peltonen
  • 169
  • 1
  • 2
  • 10

2 Answers2

4

You'll need to add another DNS Record for *.example.com that resolves to SERVER2s IP address.

If you currently have the following Host record in the example.com DNS zone:

*.example.com     [some TTL]   IN   A    203.0.113.1

Simply copy it, and change the value in the new record to 203.0.113.1 so you have:

*.example.com     [some TTL]   IN   A    203.0.113.1
*.example.com     [some TTL]   IN   A    203.0.113.2

Make sure that Round-Robin is enabled on the DNS server (virtually any hosting provider enables round-robin).

1

If each of your apps lives on 1 and only 1 web server. Then you do not need to include web server in DNS. Just create records as needed.

server1 IN A 203.0.113.1
server2 IN A 203.0.113.2 

*.example.com  IN CNAME SERVER1
app.example.com IN CNAME SERVER1 
foo.example.com IN CNAME SERVER1
bar.example.com IN CNAME SERVER1 
baz.example.com IN CNAME SERVER2
qux.example.com IN CNAME SERVER2 

if you really wanted to could make *.example.com point to SERVER2 as well, and just make sure that you had your content for the default site on both servers. But as long as you don't have the same app running on multiple servers, there is no need to send the wildcard everywhere. Is the goal here redundancy? or just dealing with load? If you have a wildcard ssl certificate you can install that on all the servers to cover every application.

Doon
  • 1,451