It’s really pretty simple to setup, i thought it’d be more of a challenge, but it wasn’t hard at all. The major thing I had to change was setting up my sessions on jenniebot to be stored in the database rather than on the webserver. This is pretty much the biggest thing you need to worry about. It will add a greater strain on your database due to processing sessions via the db rather than the web server.
Ok, onto the technical stuff:
My resources for this are the tech docs located at: http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/DeveloperGuide/
I pretty much just followed the example line by line.
elb-create-lb jenniebotloadbalancer –headers –listener “lb-port=80,instance-port=80,protocol=HTTP” –availability-zones us-east-1a
elb-configure-healthcheck jenniebotloadbalancer –headers –target “HTTP:80/ping” –interval 30 –timeout 3 –unhealthy-threshold 2 –healthy-threshold 2
elb-register-instances-with-lb jenniebotloadbalancer –headers –instances i-xxxxxx,i-xxxxxx
One thing to note that the documentation doesn’t tell you, is that you need to go do your dns provider and change your site’s www.xxxx.com and xxxx.com to reference the public loadbalancer name that amazon provides you when you startup your load balancer.
This could be really helpful when combined with the AutoScaling feature that Amazon offers. I’d recommend building an Amazon Image after every deployment so that you can spawn that image and add it to the load balancing pool when necessary. It’d be even better if you had a statically generated site with flat html that you could push using lighthttpd or some sort of setup like that. Ok, enuff talking.. email me or drop a line in the comments if you have questions!
Have fun load balancing!
-d
