lower default TTL to 1 hour

this actually raises availability when changes occur in the infrastructure and smooths
transitions.

1 day TTLs was relevant back when DNS servers and traffic were much slower

i do not think it is relevant anymore, and 1h seems much more reasonable
This commit is contained in:
Antoine Beaupr�� 2015-03-04 17:11:34 +00:00
parent f204ceeb71
commit 87c2352d61
5 changed files with 9 additions and 8 deletions

View File

@ -1501,7 +1501,7 @@ class m_dom {
* TRUE sinon.
*
*/
function edit_domain($dom, $dns, $gesmx, $force = false, $ttl = 86400) {
function edit_domain($dom, $dns, $gesmx, $force = false, $ttl = 3600) {
global $db, $err, $L_MX, $classes, $cuid, $hooks;
$err->log("dom", "edit_domain", $dom . "/" . $dns . "/" . $gesmx);
// Locked ?
@ -1528,7 +1528,7 @@ class m_dom {
# Can't have ttl == 0. There is also a check in function_dns
if ($ttl == 0) {
$ttl = 86400;
$ttl = 3600;
}
$t = checkfqdn($dom);

View File

@ -115,7 +115,7 @@ CREATE TABLE IF NOT EXISTS domaines (
noerase tinyint(4) NOT NULL default '0',
dns_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE',
dns_result varchar(255) not null default '',
zonettl int(10) unsigned NOT NULL default '86400',
zonettl int(10) unsigned NOT NULL default '3600',
PRIMARY KEY (id),
UNIQUE KEY (domaine)
) ENGINE=MyISAM;

View File

@ -1,2 +1,3 @@
ALTER TABLE `actions` CHANGE `type` `type` ENUM('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIX_DIR','FIX_FILE','CHMOD') DEFAULT NULL ;
-- lower default TTL
ALTER TABLE `domaines` CHANGE `zonettl` `zonettl` int(10) unsigned NOT NULL default '3600';

View File

@ -8,7 +8,7 @@ domaines:
noerase : 0
dns_action : OK
dns_result : 0
zonettl : 86400
zonettl : 3600
-
id : 2
compte : 2001
@ -18,4 +18,4 @@ domaines:
noerase : 0
dns_action : OK
dns_result : 0
zonettl : 86400
zonettl : 3600

View File

@ -42,10 +42,10 @@ dns_get_zonettl() {
)
# default value
if [ "$zonettl" == "" ] ; then
zonettl="86400"
zonettl="3600"
fi
if [ "$zonettl" -eq "0" ] ; then
zonettl="86400"
zonettl="3600"
fi
echo $zonettl
}