A DNS cache contains entries that translate Internet domain names to IP addresses, for example matching setcronjob.com with 220.127.116.11.
Besides system’s DNS cache, SetCronJob has its own DNS cache that each entry’s TTL (time-to-live) is 1 day. Once a domain name is resolved to an IP address, it’ll be kept at SetCronJob’s DNS cache for one day.
At the moment, our service has around 100,000 cronjobs, and active cronjobs are executing 1,300,000 times a day. Thanks to our DNS cache, the cron processors just need to resolve 8,500 domain names a day instead of 1.3 million times a day, and that’s saving much server resources.
In case your domain name changes its IP address, the DNS cache may not be updated as soon as expected; it’ll cause a glitch in the cron execution. There are two cases:
- If the cron fails i.e. the old IP address doesn’t respond appropriately with the current request, SetCronJob will refresh the cache entry, trying to get the new IP address.
- If the cron is still fine, the IP address will be updated next day. To force SetCronJob refresh any DNS cache for any domain name, just Edit then Save one cronjob with that domain name.
If there’s something unclear, feel free to comment below, or email me.
Nguyen An Thuan.