Loading ...

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

Preferred communication *

Thank you. We will be in touch with you shortly


***Note: DevPay is the predecesor of the AWS Marketplace. If you are looking for a step-by-step guide for the AWS Marketplace click here-***

Creating and launching your aiScaler instance

Registering for aiScaler AMI

  1. Before being able to use aiScaler on Amazon AWS you should subscribe by going to Amazon AWS subscriptions.
  2. Select the aiScaler service from the list of offering on the AWS market, fill in the necessary information, and follow the on screen wizard.
  3. Once the subscription process is completed a message will appear showing your confirmation/verification code. You will then be able to start a new aiScaler instance


Starting the Management Console

  1. To launch a new aiScaler application instance you need to go to your amazon AWS Management Console click on the button (Sign in to the AWS console)
  2. Login using your AWS credentials, use the same credentials you have used to subscribe for aiScaler.
  3. Once logged in select the Amazon EC2 tab and you will see a screen that looks like the figure below

Creating and saving your configuration

The aiScaler configuration file

Before selecting and launching an aiScaler instance, it is important you first create a configuration file.

The aiScaler configuration file contains the necessary information for aiScaler to accelerate your site. As a previous step to launching your AMI, you will need to prepare your configuration file and make it available so the AMI can retrieve it. Please note that the AMI will download and use this file every time it is booting, so you will need to ensure its continued availability.

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, aicache 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 aicache 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.
In case you would prefer to keep this configuration file in an Amazon S3 bucket, instead of in your own server, please refer to the following section.

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.

  1. In the AWS Management Console, select the Amazon S3 tab.
  2. 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”.
  3. Select your bucket in the left panel and click the “Upload” button.
  4. 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”.
  5. Verify that the transfer succeeds. Your file should appear in the bucket contents now.
  6. Right click on the configuration file and select the “Properties” option. In the panel that appears below select the “Permissions” tab.
  7. Click on the “Add more permissions” action. A new permission entry will appear.
  8. Select “Everyone” in the “Grantee” drop-down, and check “Open/Download”. Click “Save”
  9. Go back to the “Details” tab in the properties. Take note of the URL provided there.
  10. 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)

Launching aiScaler instance

Selecting an AMI

  1. From the left side menu select the AMI option (AMI)
  2. In the viewing box , select Public Images, Select Instance Store Images, Select all platforms. Type aicache in the provided box and hit enter. You will be presented with a screen that looks like the figure below
  3. Select the latest aiScaler image, normal aiScaler images manifiest files are of the format


Do not select images that follow another format.  Those images are specific to cloud vendors (rightscale for this example).
Prefix aicache can be also aicache.eu for European AMI. Latest version is aicache/aicache.v6279.manifest.xml.

Launching an Instance from the AMI

Select the image and then click the launch button shown on top, this will open the Launch instance wizard as shown below.

Once clicked on launch, the Request Instance Wizard will start, on the first screen you can select Number of Instances, Instance Type, Availability Zone, these can be left with default options and then click on Continue

On next page for Advanced Instance Options you shall provide the URL for the aiScaler configuration file. That is done by providing a string with the format CONFIG=<configuration file URL> in the “User Data” field (as text).

On the following screen add some Tags if needed for the server:

On the next screen 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 “aiCacheKeypair”) and then click on “Create & Download your Key Pair“. The newly created key pair will be downloaded to your computer.

The next step 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.

Testing your aicache instance

Point your browser to the amazon EC2 address – http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com. If aiScaler has started correctly and there are no problems with config file, the accelerated site should appear. Otherwise, please check the following sections in order to connect to your instance and troubleshoot.

Connecting to your aiScaler instance

Usually you don’t have to access your aiScaler instance via SSH – it will download config and keep aicache process alive automatically. But if you need to manually adjust config and don’t want to restart your instance, connecting is indispensable. For Windows SSH you can use Putty. For Linux and Mac use your favourite SSH clients.

Access your aiScaler instance using your Amazon SSH keypair

Download your amazon AWS keypair file and use ssh (unix / Mac ) to connect to your instance.
The ssh keypair is what you have created in subsection Creating a new Keypair

ssh -i path_to_aws_keypair root@ec2-xx-xx-xx-xx.compute-1.amazonaws.com
ec2-xx-xx is the public DNS name for your instance

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

Online Docs AWS

Configuration file

NOTE: Please note that upon reboot the aicache instance contents are not stored once instance is booted back, so please make sure you have your configuration backed up locally, or on email or anywhere you want!

Configuration file you’ve provided as user data input located at


Restarting aiScaler

After you did some changes in config file, you have to restart aicache.

/etc/init.d/aicache restart

This command will kill current aicache process and within 5 seconds new one will be started by aicache watchdog.
Also watchdog will restart aicache in case of any crashes.

Log rotation for aiScaler

AiCache 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.
aiCache’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.

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.


US (208) 948-9786‬   EU ‭+31 621302365