File: failover.html

package info (click to toggle)
tinydyndns 0.4.2.debian1-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 1,332 kB
  • ctags: 1,221
  • sloc: ansic: 10,245; sh: 291; makefile: 73
file content (112 lines) | stat: -rw-r--r-- 4,471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<html> <head>
<title>tinydyndns - failover</title>
</head>
<body>
<a href="http://smarden.org/pape/">G. Pape</a><br>
<a href="index.html">tinydyndns</a>
<hr>
<h1>tinydyndns - failover</h1>
<hr>
<a href="#overview">Overview</a><br>
<a href="#dns">Prepare failover for tinydyndns DNS service</a><br>
<a href="#pop">Prepare failover for tinydyndns POP service</a>
<p>
<a href="#switch">How to switch services to the failover machine</a>
<hr>
<a name="overview">
<h3>What can make the <i>tinydyndns</i> service fail?</h3></a>
<ol>
  <li>The nameserver handling the delegation to the <i>tinydyndns</i>
  domain is unavailable
  <li>The nameserver running the <i>tinydyndns</i> service is unavailable
  <li>The POP server handling the POP service for <i>tinydyndns</i> is
  unavailable (normally the same server as in 2.)
</ol>
<p>
<h3>How can I provide failover services in these cases?</h3>
<ol>
  <li>Make sure you have multiple nameservers providing the delegation
  to the <i>tinydyndns</i> domain.
  Refer to the <a href="http://cr.yp.to/djbdns.html">djbdns documentation</a>
  on how to
  <a href="http://cr.yp.to/djbdns/run-server.html#replicate">
  replicate your DNS service</a>.
  To provide failover for your <i>tinydyndns</i> services, you need to
  have control over the servers handling the delegation.
  <li><i>tinydyndns</i> doesn't support automatic replication of its
  dynamic DNS data, so the <i>tinydyndns</i> domain cannot be handled by
  multiple servers simultaneously.
  But you can prepare one or more additional machines to handle the
  <i>tinydyndns</i> services in case the primary machine is unavailable,
  see <a href="#dns">below</a>.
  <li>To be able to switch over the POP service to another machine in case
  the primary machine is unavailable, you need to replicate the POP password
  database for the dynamic hosts whenever it changes, so that the failover
  machine knows about all dynamic host names that are handled by this
  <i>tinydyndns</i> service.
  See <a href="#pop">below</a> on how to do this.
</ol>
<hr>
<a name="dns">
<h3>How to prepare a failover service for dynamic DNS data</h3></a>
Simply <a href="configure.html">configure tinydyndns</a> on the machine
that should take over the <i>tinydyndns</i> and POP service in case the
primary server is unavailable.
Of course configure <i>tinydyndns</i> to handle the same domain name as
the primary <i>tinydyndns</i> server, on an IP address of this failover
server.
<p>
Adjust the TTL (time to live) of the delegation to the <i>tinydyndns</i>
domain to your need (say four hours).
This is the worst case downtime of the <i>tinydyndns</i> service in case
the primary <i>tinydyndns</i> server gets unavailable, and after the
administrator takes action.
Switching over the services currently needs manual intervention.
<a name="pop">
<h3>How to automatically replicate the POP password database</h3></a>
The <i>tinydyndns</i> password database is changed by the
<tt>./setpasswd</tt> script only.
To have the database replicated automatically when <tt>setpasswd</tt> is
run, add a line that copies or syncs the <tt>passwd</tt> file to the
failover machine to the end of the <tt>setpasswd</tt> script (remove the
last line ``exit 0'' first).
<p>
E.g.: A primary <i>tinydyndns</i> service runs on
<tt>a.ns.dyn.smarden.org</tt>.
The failover service is prepared on a server with the IP address
<tt>a.b.c.d</tt>.
Add this line to <tt>/service/tinydyndns-pop/setpasswd</tt> on
<tt>a.ns.dyn.smarden.org</tt>:
<pre>
 # cd /service/tinydyn-pop/
 # cat &gt;&gt;setpasswd &lt;&lt;EOT
 rsync -e ssh passwd a.b.c.d:/service/tinydyn-pop/passwd
 EOT
 #
</pre>
<hr>
<a name="switch">
<h3>How do I switch services to the failover machine</h3></a>
First rebuild the <tt>data.cdb</tt> from the current passwd database on
the failover machine:
<pre>
 # cd /service/tinydyn/root
 # make rebuild
 ...
 #
</pre>
Now change the delegation on all available DNS servers that handle the
delegation to your <i>tinydyndns</i> domain to delegate the domain to
the IP address of the failover machine is running <i>tinydyndns</i> on.
<p>
That's it.
Within the next four hours (or whatever you've set as TTL), clients that
try to update there dynamic DNS entry, and clients that ask for dynamic IP
addresses of hosts in your <i>tinydyndns</i> domain, will switch to
contact your failover machine.
<hr>
<address><a href="mailto:pape@smarden.org">
Gerrit Pape &lt;pape@smarden.org&gt;
</a></address>
</body>
</html>