The demo´s purpose is to check the load balancer working as a cloud service (PaaS) and its simple implementation.
The necessary resources for this demo to happen were: an Elastic Load Balancer (ELB), three Ubuntu server (IaaS) instances and a Relational Database Service (RDS).

topologia aws

The related Ubuntu instances were created from Amazon AWS EC2 and each one of them was configured with Apache2 and PHP5. The application that runs on these servers connects to a MySQL v5 database (RDS) that is hosted on another machine.
The load balancer is also an independent machine that balance that web application requests among the available EC2 servers.
Each Ubuntu server differs from one another on their background color. The PHP code feeds the database with the data submitted in a form. This way index.php displays that form and registros.php shows the database records.

At first each EC2 server content is checked and if everything is ok with them, the load balancer (represented by the virtual IP) distributes the requests among servers. The load balancer is a classic one that means it relies on layer 4, redirecting TCP session to the servers and assuming Round Robin as a default predictor despite any other parameter that would distinguish any of the servers. At this moment no cookie is created for the sessions.

Later on, the load balancer is configured to enable stickiness by creating a cookie (called AWSELB). Now the load balancer choose one of the available servers to stick to on every TCP request. This is very common on e-com applications to avoid data loss related to a purchase when the session is distributed to the servers.

At last stickness is disabled so the load balancer turn back on distributing the requests again. The CRUD operation was checked as well by the database CLI and this was reflected in the application page (registros.php).