Bega High School Work Experience – A Load Balanced Web Server

This week we have been given the opportunity to conduct our work placement for I.T VET at 2pi Software. Within these days we have been able to set up a small web server running an Odroid as the master system, which had a load balancer installed, using Nginx, to evenly spread the traffic from incoming requests.

A load balancer is a device that evenly distributes incoming traffic between nodes. This increases the amount of requests and will increase the reliability of the server, which is critical for a company’s efficiency for their online presence. A company that uses load balancing is Google, which would have a massive load of requests being sent to the servers, which will then have to be evenly distributed across all their servers.

The requests were then distributed across 3 different Raspberry Pi systems, low cost, high availability micro computers that allow users to achieve goals such as learning basic coding to more experienced projects like creating a mini arcade machine.

These were then benchmarked to see how much stress the server will be able to take when under a heavy load of requests. We recorded our results and then compared the data to make sure the nodes were running at the same efficiency.

Also during the week we were given the task of making a MySQL database which was hosted on the Odroid to observe how the web server could handle the load of running a MySQL database with PHP.


Our setup looks like this:

Our load balancing system

Odroid on top of the switch

The 3 Raspberry Pi’s


We ran multiple tests using different types of media, these include:

  • Static HTML
  • Static HTML with an image
  • PHP
  • PHP and MySQL

The results we collected are below, where data presented ranges from the 50th to 100th percentile. The number on the right of the percentage indicates the response time in milliseconds.

Odroid w/PHP & MySQL (3 nodes)

Odroid w/ static HTML

Odroid w/ PHP

Odroid w/ image HTML

50%   1510

  66%   1546

  75%   1563

  80%   1573

  90%   1597

  95%   1619

  98%   2139

  99%   2387

100%   2690 (longest request)

50%    211

  66%    245

  75%    301

  80%    322

  90%    358

  95%    394

  98%    453

  99%    528

100%   1493 (longest

  50%    962

  66%   1031

  75%   1069

  80%   1092

  90%   1150

  95%   1193

  98%   1235

  99%   1306

100%   2288 (longest request)

50%    214

  66%    239

  75%    275

  80%    304

  90%    339

  95%    403

  98%    651

  99%   1201

100%   1273 (longest request)


These results show that using more complex web tools will slow down the web server significantly. This is shown in the odroid with PHP & mySQL  which has results that are double of the static HTML.