This is an old revision of the document!


Smart Subdomains

You can access the Smart Subdomains for the current domain by scrolling down to the Advanced Features section:

Smart Subdomains are special subdomains that return IP addresses generated by scripts. These scripts get information on the user requesting the IP address (like his/her country, network, other information) and make a decision on what IP address to return. The script linked to a smart subdomain runs every time a user requests the IP address of the subdomain. The scripts are written in PHP and run on a limited version of the PHP virtual machine.

A script could for instance redirect users to the closest mirror based on the country or the network of the user, or to the least loaded machine, or redirect users to healthy servers when some of the servers go down.

The information that GeoScaling can send to a script is:

  • the 2 characters ISO code of the visitor's country (for example es for Spain, it for Italy etc)
  • the AS number (network name) of the visitor (example: as39756 is the HOSTWAY Romania network)
  • uptime information on your servers
  • extra information such as server load, sent through our XML-RPC API
  • the name of the smart subdomain connected to this script (for example www.example.com)
  • the IP address of the user requesting the IP

The script can then use any of the above items, or a combination, to choose which IP address to return to the user. Please click here for a short guide on writing smart subdomain scripts.

 
smart_subdomains.1422135508.txt.gz · Last modified: 2015/01/30 00:40 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki