... more stuff
at
php-app-engine.com

Archive for the ‘LoadBalancing’ Category

Setting up EBS as a RAID

Sunday, January 24th, 2010

http://groups.drupal.org/node/36750

Very similar to setting up an instance with a single EBS drive, you can also fairly easily do a RAID configuration. This leads to better performance usually and higher reliability.

Automatically scaling a LAMP application in the cloud

Saturday, January 16th, 2010

http://www.lindstromconsulting.com/node/8

In the previous article on the subject of cloud computing using AWS, we setup a simple LAMP application that used a single web server to present data that was queried from a single RDS instance. In this guide we will see how to save the changes we made to the EC2 instance, create more EC2 instances, and setup load balancing across our web servers.

Amazon ELB – Capturing Client IP Address

Friday, January 1st, 2010

http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html


If you’re using Amazon EC2’s Elastic Load Balancer (ELB) for load balancing web applications, you may have noticed that in your web access logs, the remote host IP address is the same for every request. The IP address you see is the private IP address of the load balancer.

If you want to see the IP address of the client (called remote host in access log documentation), you’ll need to look at the value of the X-Forwarded-For request header which ELB populates when it forwards the request.

Using ELB to Serve Multiple Domains Over SSL on EC2 for Giggles and Unicorns

Wednesday, December 23rd, 2009

http://elwoodicious.com/2009/12/23/using-elb-to-serve-multiple-domains-over-ssl-on-ec2-for-giggles/

One of the complaints about EC2 is that you only have one IP address allocated per instance which makes it difficult to host, in a clean manner, multiple domains that require SSL certs. Where you have control over IP allocation you could punch down a couple for one server and then set up your domains and SSL certs by IPs. That method is a no go so you are left with the ugly method of allocating those certs by port, something that Joe and Jane public are a little skittish about (https://superawesomefuntime.com is cool but https://superawesomefuntime.com:8443 smells phishy). Thankfully, ELB makes for a great proxy to hide the hideousness of the port-based workaround.

Thread: ELB not handling requests which can be handled by one single instance

Tuesday, December 22nd, 2009

http://developer.amazonwebservices.com/connect/thread.jspa?threadID=34938

I would like to know two things below, because I am observing an elb which has got only one IP address (namely one virtual load balancer) is giving us lots of timeouts under a certain load which a single c1.medium Apache server can process without any timeouts.

(1) basic performance info of a typical virtual load balancer under an elb, including rate per second and concurrent connections. In our case, http.
(2) what triggers “ramping up” elb

RAID and LVM on Amazon EC2 (part I)

Wednesday, December 9th, 2009

http://debianzone.org/raid-and-lvm-on-amazon-ec2-part-i/

This is the first part of three articles I’m posting for a great storage solution using RAID, LVM and Amazon Elastic Block Store (EBS).

First, you need to choose your RAID implementation. Personally, I prefer to use RAID 5 on Amazon EC2, combined with LVM2.

A talk with Brandon Whichard about Zenoss, the cloud, Amazon’s EC2 and more

Friday, November 27th, 2009

http://www.freesoftwaremagazine.com/columns/talk_brandon_whichard_about_zenoss_cloud_amazons_ec2_and_more

This sounds like a dream: you are running out of CPU power? Easy, within 10 minutes you have another server ready to roll. However, it’s not really that simple. Unless you did things right, a new server won’t go very far — it needs to be configured to do the right thing. For example if your web server is under too much stress, and you add a server, the second one needs to be in the pool of daemons which serve web pages; more importantly, it needs to be able to access the data (database and files) in order to do that. So, realistically you will have a database server, a file server, a main web server which will act as a proxy, and a pool of web servers which will access data from the shared file system and the database server(s). Such a setup is common but it’s not as straightforward as it might sound. You might decide to have only one database server, and use memcached instead — therefore having a second pool of servers. No, it’s not for everybody. I pointed this out to Whichard. He said “Yeah, you are totally right. You definitely will need a script that will configure the new server and will get it to do something useful. The setup you mentioned [with a reverse proxy server dispatching HTTP requests to sub-servers] is the most common one; thing is, now there is the technology to do this. It might not be easy (well, not yet) but it’s definitely possible.

Terracotta tests on the Cloud – Part 1

Tuesday, November 24th, 2009

http://tech.mangot.com/roller/dave/entry/on_running_terracotta_on_ec2

One recent project he asked me to do was run a large test of Terracotta on a cloud. Any cloud. So I set out to find an appropriate cloud environment and a way to run one of our session clustering tests. What I wound up with was a framework that can be used to scale anything on EC2 with relative ease.

EC2 Elastic Load Balancing for Fun and Profit

Monday, November 23rd, 2009

http://elwoodicious.com/2009/11/23/ec2-elastic-load-balancing-for-fun-and-profit/

Before we dive in, a little background on operations. We’ve been making use of the elastic IP feature since it came out along with round robin DNS to handle the distribution of traffic over the web servers. Sure, it is crude and primitive but it works and I am a big fan of implementing the simplest possible solution since more moving parts results in exponentially more headaches. And, yes, we tried the HAProxy and the Nginx route but the cost+plus heartburn factor was too high for what we needed. Anyway, things have worked just fine with a minimum of effort on our part but our needs are changing so we need a solution that is both flexible and forgiving. Brittle is only good with peanuts.

First things first, create an ELB…

Elastic Load Balancing in EC2

Sunday, November 22nd, 2009

http://stackoverflow.com/questions/877468/elastic-load-balancing-in-ec2

I’ve been running and ELB instead of HAProxy for about a month now on a site that gets about 100,000 visits per day and I’ve been pretty pleased with the results.

A couple of gotchas though:

1. You can’t load balance the root of a domain as you have to create a CNAME alias to your load balancer. Once solution is to redirect all traffic from http://mysite.com to http://www.mysite.com
2. ELBs don’t have SSL termination capability so if you need SSL to your application you’ll need to run your load-balanced webserver on an alternative port (I use 8443).

Apart from that I really can’t speak highly enough of the AWS ELB offerings. I’m also using the Cloudwatch monitoring and autoscaling. Oh and don’t forget it’s cheaper than running a small EC2 instance ($0.025 per hour instead of $0.10)

Amazon Elastic Load Balancer Setup

Friday, November 6th, 2009

http://serktools.com/2009/05/20/amazon-elastic-load-balancer-setup/


As I previously wrote about, Amazon announced a load balancing solution called Elastic Load Balancer. While this may prove to be a great addition to AWS currently none of the GUI tools (including the AWS Console provided by Amazon) have built in functionality to create ELB instances.

So I became motivated to finally get comfortable with the EC2 API, allowing me to call EC2 commands from my windows command line. I wrote a post detailing how to setup your command line environment for the EC2 API here.

Now armed with a load balancing solution and a working windows command line I wanted to delve into ELB and see what it has to offer.

Amazon Elastic Load Balancing Only Simple On the Outside

Thursday, October 15th, 2009

http://devcentral.f5.com/weblogs/macvittie/archive/2009/10/15/amazon-elastic-load-balancing-only-simple-on-the-outside.aspx

NOTE: What follows is just my personal analysis, I don’t have any especial knowledge about what really lies beneath Amazon’s external interfaces. The diagram is a visual interpretation of what I’ve deduced seems likely in terms of the interactions with ELB given my experience with application delivery and the information available from Amazon and should be read with that in mind.

Load Balancing in Amazon EC2 with HAProxy

Wednesday, October 7th, 2009

http://agiletesting.blogspot.com/2009/02/load-balancing-in-amazon-ec2-with.html


Until the time comes when Amazon will offer a load balancing service in their EC2 environment, people are forced to use a software-based load balancing solution. One of the most common out there is HAProxy. I’ve been looking at it for the past 2 months or so, and recently we started to use it in production here at OpenX. I am very impressed with its performance and capabilities. I’ll explore here some of the functionality that HAProxy offers, and also discuss some of the non-obvious aspects of its configuration.

haproxy, ec2 and multi cores

Saturday, October 3rd, 2009

http://www.mail-archive.com/haproxy@formilux.org/msg00887.html

I’m in the process of moving our core traffic from a local datacenter
to ec2, using haproxy for load balancing.

I am unable to get full usage of the 2 virtual cores. Previewed the
full traffic load today and hit cpu limits immediately. Initially,
with nbproc = 1, I see the first core is used at 100% utilization, the
second core remains completely idle.