Perlbal on EC2

David Snopek dsnopek at gmail.com
Tue Aug 7 15:05:13 UTC 2007


EC2 *does* provide access to IP addresses.  Here's how I do it:

 (1) On startup, the machine figures out its IP by grabbing the document at:

    http://169.254.169.254/1.0/meta-data/local-ipv4

 (2) Then it calls a service on the proxy host, passing the IP address
found in the step above, and it appends it to the nodefile used by
Perlbal.

If you don't want to do this from the machine itself (although I
highly suggest it because then you can make sure that your webserver
is up and running before it makes the call to add itself to the pool)
then just resolve the hostname via DNS.

On 8/7/07, David Cancel <dcancel at gmail.com> wrote:
> I'm trying to use Perlbal to load balance a cluster of web servers hosted on
> Amazon's EC2. EC2 does not provide access to IP Addreses, only hostnames.
>
> Is there a way to pool servers using hostnames instead of IP addresses?
>
> e.g.
>
> This:
> POOL my_web ADD
> ec2-xx-xx-xx-xxx.z-1.compute-1.amazonaws.com:80
> vs:
>  POOL my_web ADD 10.1.1.111:80
>
> Thanks,
> David


More information about the perlbal mailing list