aiScaler adds DNS support for Origin Content
Posted by Max Robbins on December 1st, 2010Our customer presented several scenarios, such as front ending API’s off of a CDN, where the Origin server being accelerated by aiScaler can change and needed to be referred to by DNS name.
To address this requirement we implemented a special thread dedicated to out-of-band resolution of DNS-defined origin servers. The thread runs in the background and periodically resolves OS DNS names to numeric IPs via regular DNS resolution. It is done so that aiScaler is not burned with overhead of DNS resolution when it needs to access origin servers – such resolution happens out-of-band.
You configure how frequently aiScaler runs such DNS resolution, at per-website basis, via dns_interval setting. Specified in seconds, the default value is 120 seconds (2 minutes).
Consider the following example:
origin 127.0.0.1 8888 0 10
origin 127.0.0.1 8889 0 20
origin 127.0.0.1 8890 0 30
website
hostname www.acme.com
dns_interval 600
..origin origin.acme.com 80
www.aiCache.com
Upon startup, aiScaler resolves all and any DNS-defined origin servers. Assuming origin.acme.com has 5 DNS “A” records defined, 5 OS will be defined, used and reported.
Every 600 seconds (10 minutes) aiScaler re-runs DNS resolution for this website, attempting to resolve origin.acme.com to a list of DNS “A” records. As long as the same 5 “A” records are returned, there are no changes to OS configuration that was established during the startup.
If an additional record is returned, it is added as an additional OS for www.acme.com. It is also reflected in the aiScaler error log file.
When a previously-defined “A” record disappears, it is marked as “DNS-disabled” and is not used in OS capacity (no traffic is sent to it). However, the record of that OS is kept by aiScaler – so you can see its statistics etc. It is also reflected in the aiScaler error log file.
When a previously-disabled “A” record re-appears, it is marked as “DNS-enabled” and is set to again receive its share of traffic. It is also reflected in the aiScaler error log file.
aiScaler also reports when a website has any DNS-defined OS. Time of last DNS resolution is also logged and reported. All DNS-defined OS are reported likewise.
To assist in initial DNS setup, aiScaler offers global debug_dns flag setting. When set, copious amounts of DNS debug information are written out to aiScaler error log file.
We expect our customer to continue to come up with creative scenarios and we enjoy adding feature functionality like this to accomodate.