HTTPS Load Balancing

You can have ssl between aicache and client with http to apache or ssl both ways

Customer:

ok. let' give it a try then.

aiCache Support:

also if u need sticky sessions (each user works with one application server) aicache can be configured for server persistance

Customer:

I need that

Customer:

the sticky sessions

aiCache Support:

ok, you will need to add

aiCache Support:

os_persist

aiCache Support:

in general config section

aiCache Support:

https://aws-portal.amazon.com/gp/aws/user/subscription/index.html?offeringCode=B6A85F0B

Click there

aiCache Support:

Will u need to balance ssl only or http also?

Customer:

both

Customer:

the client use http until they enter to the purchase form

Customer:

so it should keep that session

aiCache Support:

understood

Customer:

ok, done

aiCache Support:

so, next step is to spin up ec2 instance from aicache6.1 AMI

Customer:

I'm on it

aiCache Support:

ok, great

aiCache Support:

config file to edit - /root/aicache.cfg

Customer:

it still "pending"

aiCache Support:

Give it 2 minutes

Customer:

finished, let me connect now

aiCache Support:

sure

Customer:

I'm on the config file

aiCache Support:

ok, first of all u need to set the hostname

Customer:

done

aiCache Support:

also, upload key and cert files for ssl to /root

aiCache Support:

also copy them to /usr/local/aicache

aiCache Support:

and in general section of config

aiCache Support:

add

aiCache Support:

listen https * 443 server.cert server.key AES-256:SHA

aiCache Support:

if u have chain cert you will need to concat certs into single file and name it like 'server.chain.cert'

Customer:

which is the general section?

Customer:

the first one?

aiCache Support:

first one

aiCache Support:

before line 'website'

Customer:

done

aiCache Support:

ok, great

aiCache Support:

in hostname section add

aiCache Support:

os_persist

Customer:

done

aiCache Support:

if you want aicache to use ssl-ed connection to app servers (origins)

aiCache Support:

then add also

aiCache Support:

use_os_ssl AES-256:SHA

aiCache Support:

if u will use this setting

Customer:

no, is ok for testing we can use regular http

aiCache Support:

then connections coming from client to aicache via https will go to origin server via https too

aiCache Support:

ah ok

aiCache Support:

let's go forward then

aiCache Support:

just skip patterns section

aiCache Support:

and come to origins section

aiCache Support:

there you need to define origin servers

aiCache Support:

to which traffic will be balanced

aiCache Support:

origin <ip> 80

Customer:

I add the internal ips of the web servers?

aiCache Support:

if they are in same availability zone on AWS

aiCache Support:

then yes

aiCache Support:

use internal ip addresses

aiCache Support:

10.x.x.x

Customer:

ok, if I want to add a second one?

aiCache Support:

just add another line

aiCache Support:

origin <ip> 80

Customer:

ok

Customer:

done

aiCache Support:

if u want to handle https to origins

aiCache Support:

then u will need to add

aiCache Support:

origin_https <ip> 443

aiCache Support:

otherwise http only will be used

aiCache Support:

ok if done

aiCache Support:

we are ready to go

aiCache Support:

save file

aiCache Support:

then

aiCache Support:

telnet localhost 2233

aiCache Support:

use password 'secret' (without quotes)  Please change that in the config file.

aiCache Support:

then 'reload'

aiCache Support:

and 'quit'

aiCache Support:

it will initiate the 'warm restart' of aicache

aiCache Support:

or u can use 'pkill aicache' from shell prompt

aiCache Support:

to do the same, but with cache dropped/sticky sessions dropped

Customer:

ok, done

aiCache Support:

ok, now u need to test it

aiCache Support:

probably u will need to update ur local hosts file to include target hostname to ip address of new aicache box

Customer:

ok let me do the changes

it is working