4
votes

I'm really new to the whole Amazon EC2 API and workarounds. I've already discovered the Amazon API and created a basic program that creates/removes instances according to the active instances CPU.

But for a project I have to create a custom load balancer. Up to now I've browsed many websites searching for ways to create a custom load balancer using the Amazon API, but somehow nobody ever made one? (Or they are damn well hidden away for Google)

Can anybody point me in the good direction or help me with this problem?

1
Why do you want custom load balancer and not use one of the existing ones?Andrey Marchuk
We (me and my group) have to create a custom load balancer and then compare ours with the existing one of amazon. That was the project description we received upon start of the project. I've already managed to do a lot with the API but somehow that feature has yet to be discovered :-)Tom
will a instance with Apache Mod-proxy as load-balancer not do the job?Nishant

1 Answers

2
votes

Well the API will help you do infrastructural/administration tasks, such as booting up new instances, monitoring their resource usage etc. (as you have already noticed). But obviously to build your own load balancer instance, you will need to log into whatever flavour of Linux you choose and install load balancing/reverse proxy software, such as HAProxy or Nginx.

This has been done by many I suspect, as it's only quite recently that Amazon's ELB has become more feature-rich (e.g. SSL termination, cookie persistence).

You may find this useful: http://blog.rightscale.com/2010/04/01/benchmarking-load-balancers-in-the-cloud/ along with the white paper that's mentioned in the blog post. A very common approach is to install HAProxy alongside Stunnel or Pound (the latter two for SSL termination).