Loading ...

Would you like to discuss your environment with a knowledgable engineer?

Preferred communication *

Thank you. We will be in touch with you shortly

Getting Started AWS Marketplace


1. aiScaler instance deployment
1.1 Deploying with 1-Click Launch
1.2 Deploying with EC2 Console
2. aiScaler configuration
2.1 Connecting to your aiScaler instance
2.2 General information about the aiScaler configuration file
2.3 Log rotation for aiScaler
2.4 Publishing the aiScaler file to an Amazon S3 bucket
2.5 Advanced aiScaler configuration
3. Testing your instance

Note: The difference between aiScaler, aiMobile and aiProtect

The images themselves are identical and are sometimes referred to as aiCache. There are no software limitations, as of January 2014. The config file determines whether your instance will become an instance of aiScaler, aiMobile or aiProtect. For example: if you want to add a web cache to an instance of aiProtect, then simply add caching rules. Vice versa: if you want to add DDoS mitigation to an instance of aiScaler, then simply add the lines for DDoS mitigation to your config file, to enable a WAF (Web Application Firewall).

aiScaler instance deployment

Deploying with 1-Click Launch

Choose one of our products from Marketplace page of aiScaler, select your region on where to launch aiScaler and hit Continue:

Next you will be prompted to login to your AWS account.
After login you will be presented to select the options for your aiScaler instance, like region, instance type, firewall settings (security group) and key pair. Once you select the appropriate settings for you just click on Accept Terms & Launch with 1-Click button and wait for the instance to start:

This is it, you’re up and running with your aiScaler instance, next just tune up your configuration and start enjoying our product 🙂

Deploying with EC2 Console

As you have noticed, there is an option to start the instance manually, just select the tab Manual Launch and click on the appropriate “Launch with EC2 Console” button for you, to select the region:

Once clicked on Launch with EC2 Console, the Request Instance Wizard will start, on the first screen you will be asked to choose the instance type, after you click next you will be able to select Number of Instances, and Availability Zone, these can be left with the default options and then click on Next. You can skip steps 4 and 5.

Step 6 is setting the Security Group which controls network access to your instance. If this is your first AMI or you are already familiar with AWS, but need to use a different security group for this instance, select the “Create a new Security Group” option. Add at least the HTTP and SSH protocols. For each protocol, select the suitable option in the “Create a new rule” drop-down and click on “Add Rule”

Additionally, you may wise to add the HTTPS protocol if your website makes use of it. Once you have done this, you will see a “433 (HTTPS)” in the right-hand table, in addition to the basic protocols mentioned above.

On the next screen verify the settings and click on Launch to start the instance. When you press on Launch you will see a dialog to create a new Key Pair, you will use this to connect to the new instance of aiScaler. If this is your first AMI or you are already familiar with AWS, but wish to use a different key pair for this instance, select “Create a new Key Pair”, provide a name for it (we suggest “aiscaler”) and then click on “Create Key Pair“. You will be prompted to save the key on your computer.

aiScaler configuration

Connecting to your aiScaler instance

For Windows SSH you can use Putty. For Linux and Mac use your favorite SSH clients.

For more information on how to use putty to connect to your AWS instance see

AWS: Connecting to Linux/UNIX Instances from Windows Using PuTTY (use ubuntu as user name)
AWS: Connecting to Your Linux/UNIX Instances Using SSH (username = ubuntu)

General information about the aiScaler configuration file

The aiScaler configuration file is located at /etc/aicache/aicache.cfg and contains the necessary information for aiScaler to accelerate your site.

In this section we cover the configuration basics. For more detailed information and advanced configuration possibilities, please check the aiScaler administration guide.

For a quick start, download and edit the template config in your computer.
Hostname is your domain name, if you are trying to cache abc.com then change hostname (example.com) to your domain
Cname is an alias for this domain name.
If no hostname or cname found for specific request, aiScaler will respond with 409 Website not configured error.

hostname example.com
cname www.example.com

cname EC2_PUBLIC_HOSTNAME is a special substitution. You should keep this line in your configuration file, it will be replaced with amazon address like ec2-xx-xx-xx-xx.amazonaws.com and allow you to test aiScaler acceleration before making DNS changes.

Origin Servers are your application / website servers.
You should tell aiScaler how it can call your application servers by specifying the ip addresses for your origin server / servers
If you look at the example configuration file you will notice origin server entires

#origin 80 1
#origin 80 2
#origin 80 3
#origin 80 4

note that # implies that this configuration line is commented / not effective.
Add your origin ip address and remove the comment at the beginning of the line to enable origin server configuration
If you have a website at your configuration will look like this :

origin 80 1
#origin 80 2
#origin 80 3
#origin 80 4

where 80 is the port on which the server is running, the second number implies the order a which aiScaler will contact your origin servers. If case it is one server then its 1.

Now you may upload config file to your web server, take note of the URL through which it is accessible, as you will need it later during the process of creating your aiScaler instance. Also, you should take into account the following aspects:

The URL should be publicly available from any IP, without the necessity of providing any credentials.

The URL shouldn’t change. The location from which the aiScaler instance can’t be changed without terminating and re-creating the instance again. Using a permanent URL from the beginning will save you the hassle later.

To apply your new configuration don’t forget to run

service aicache reload

Log rotation for aiScaler

aiScaler server provides several options for automated or on-demand log rotation

Size-based access log file rotation

aiScaler provides automated, on-the-fly, size-based access log file rotation. This feature is typically used to cut down size of the access log files to some reasonable value, as it might be easier to deal with 10 files of 100MB each, as opposed to a single file of 1GB. To enable, simply set in the cfg file:

max_log_file_size 100000000

Be careful with those zeroes – the size is specified in bytes ! When max_log_file_size is set, aiScaler rotates present log file upon it reaching the maximum size. The renamed access file has a timestamp added to the name of the file. The size-based rotation is a zero-downtime operation and happens automagically.

On-demand log file rotation via USR1 signal.

To execute on-the-fly, on-demand log file rotation, send SIGUSR1 to aiScaler’s process ID at time of your choosing – manually or using a script driven by Linux cron facility. For example:

pkill -USR1 aicache

Simply add this command to be scheduled by Linux cron facility at time that is convenient for you.

aiScaler’s log file rotation – size-based or on demand, is a zero-overhead and zero-downtime operation, so feel free to do it on schedule that is convenient for you, there’s no performance impact. Please note that aiScaler rotates log files after the rotation is requested, upon receiving first log-enabled request.

On-demand log file rotation via CLI command

You can also tell aiScaler to rotate the log files from the CLI, using rotatelog command. After logging into CLI


Log file rotation is not cluster-wide, it is only the aiScaler instance that the command is directed at, that executes the rotation.

Publishing the aiScaler file to an Amazon S3 bucket

Having your aiScaler configuration file in the Amazon S3 service is an straightforward alternative to publishing the configuration file through your own servers. In order to do that, please follow these steps.

In the AWS Management Console, select the Amazon S3 tab.
In case you don’t have created any buckets or you find none of the current ones suitable, create a bucket using the “Create bucket” button in the left panel. Provide a bucket name and select the region where you plan your aiScaler instance will be running (this is not a hard requirement). Click “Create”.
Select your bucket in the left panel and click the “Upload” button.
In the new dialog, click on “Add files” and select the configuration file you created following the instructions in the previous section. Click “Start upload”.
Verify that the transfer succeeds. Your file should appear in the bucket contents now.
Right click on the configuration file and select the “Properties” option. In the panel that appears below select the “Permissions” tab.
Click on the “Add more permissions” action. A new permission entry will appear.
Select “Everyone” in the “Grantee” drop-down, and check “Open/Download”. Click “Save”
Go back to the “Details” tab in the properties. Take note of the URL provided there.
Verify that the file is publicly accessible by entering the URL in another browser tab (preferably, you should do this using a different browser which is not logged in into the AWS Management Console)

Advanced aiScaler configuration

aiScaler is highly configurable and has a wide range of parameters which you can tweak to suit your needs.

Please download aiScaler administration guide for details on how to configure aiScaler.

Testing your instance

Point your browser to the address of the EC2 server and add /aiscalerhelp, for example xx-xx-xx-xx-xxx.compute-1.amazonaws.com/aiscalerhelp. You can find this address in your EC2 Management console under “Public DNS”. If aiScaler has started correctly, you should see an HTML page, displaying a “help reference”. After you have changed the settings at your DNS provider, this should work for your domain name too, for example: http://www.cnbc.com/aiscalerhelp

If you want to surf your accelerated website, you can also point your browser to the EC2 server’s public DNS, without the “/aicachehelp”. This depends on how you configured your cnames. To make this work, the deployment tool is supposed to automatically add the line below when you click on “Apply config”. If this doesn’t work for some reason, you might want to check for this line or add it to your config file:

cname xxx-xx-xx-xx-xxx.compute-1.amazonaws.com
sub_hostname accessories.ford.com
# The two lines above are for testing on AWS and can be safely removed

If it still doesn’t work, please contact our support. We actually like to hear your problem, since that allows it to fix it for you and for future clients, so please do contact us. Every AWS customer is entitled to two hours of free support, so there is no point in getting frustrated. We like to help our customers

US 1 (408) 744-6078   EU +44 20 7993 4587