Skip to main content

domain name system - Robust and flexible hosting of DNS A records

itemprop="text">

I'm currently working on a web
platform that will be used to power lots of small websites. All of the websites will be
hosted on this platform, on either a dedicated or VPS set-up. I don't want to provide a
full DNS hosting service, taking on responsibility for routing emails etc, I only want
responsibility for the 'website' part of the
domains.



The obvious solution to this is to
point the 'www' A records of the domains to my server IP, which would have the desired
effect. However, what if my server dies and I need to switch all sites to a back-up on a
different server with a different IP? I'd need to contact all of the DNS providers for
all of the different domains and get them to re-point their A records. This is not
desirable.



So... question is, is there a
sensible approach to handling something like this, or am I better off just biting the
bullet and offering full DNS services via a dedicated service like Cloudfare or
DYN?



Thanks for any
advice/solutions.



itemprop="text">
class="normal">Answer



I'm not
sure I would describe this as robust. That would involve multiple
backend servers, a failover pair of load-balancers on the front end, a backup site with
a non-HA version of the same, and the use of IP addresses that you could switch between
the sites if sufficiently large disaster
struck.



But stipulating that you want to provide
web hosting without all this, without controlling your clients' DNS, but retaining the
ability to repoint operations to a second site if the need arises without contacting all
your clients to have them update their DNS, one way to do it is with
CNAMEs. For clarification, let's say that your server is on the
IP address pointed to by the A record
server.example.com. Let's say you have two clients, whose
domain names are example.org and
example.net.



Each
client publishes a CNAME record for their www hostname,
pointing to your
server:



www.example.org. IN CNAME
server.example.com.
www.example.net IN CNAME
server.example.com.



If
you need to change the IP address of your server, you change the
A record for server.example.com, which
is under your control, and after a suitable interval for DNS cacehing to expire,
www.example.{org,net} will start to resolve to the new
address.



The problem here is with naked domains.
href="https://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-of-a-domain">As
is well-established around these parts, you can't
CNAME the root of a domain. So as long as clients are happy to
have their web server solely on www.example.org, you're OK. But
as soon as one asks for web service on example.org, you have a
problem.



However, Michael Hampton points out
that some large DNS providers (he explicitly lists Namecheap and GoDaddy, though this
should not be taken as en endorsement of either one) will also provide a web redirection
service, where an A record on the naked domain points to the DNS
provider's
web server, whose sole function is to receive client browser
requests for http://example.org/foo and to redirect them via
HTTP 301-redirect to http://www.example.org/foo, at which point
the mechanism already described takes over and the request is satisfied by your server.
Clients who insist on service on their roots can be told that they must get their DNS
from a provider that offers such a
facility.



This will still not work for clients
who also want HTTPS service on their roots (eg,
https://example.org/bar); I don't know of any way to have that
work without significantly more infrastructure. But you should be OK to service everyone
else as described above.


Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

ubuntu - Monitoring CPU, Mem, disk, on a single server

I've been looking for a simple starter solution for monitoring my [currently] single server hosted solution. Other than Nagios and similar, are there other good (simple) solutions people are using? Answer Everything depends on what you want. For example Munin is very simple, you can install and configure it in less then 10 minutes (on one server), it can sends alarms, make graphs from monitoring cpu, mem. apache connections, eaccellerator, disk io and many many more (it has many plugins). But if you are planning in future get some more machines, munin may not be enough. For example in munin you cant monitor state of individual processes, can't monitor changes in files (for security purpose). So if you wanna only see what is the utilization of basics parameters on your server and don't plan to buy some more servers Munin is what you are looking for, but if you wanna be alarmed when some of your service is down, take more control on what is happeninig on...

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits, ...