Tag Archives: web server

Cluster field testing

I posted a link to my Banana Pi cluster on Reddit see how the server would cope with the traffic. It wasn’t a huge amount of traffic – about 4000 page views over two days. At its busiest, the cluster handled about 480 hits an hour.

Ganglia showed that none of the CPUs in the cluster were busy. This is pretty much what I expected would happen, and I now feel confident that the cluster can easily handle much larger amounts of traffic. It was also good to see that the data from Ganglia showed useful information that reflected what was happening to each server.

Ganglia cluster information

Ganglia 24 hour view of web server and database server clusters

I’ve also been working the newest site on the Banana Pi cluster, Linux Web Servers. I’ve written some articles about installing WordPress on Apache. It’s been a while since I worked with WordPress, and it was nice to get back to it.

I’ve started writing some posts about Nginx, which I hope to publish soon.

Advertisements

Moving to a larger cluster

I’ve been building a larger version of my Banana Pi cluster. It was originally built with just four nodes, but I’ve extended it to 8. There are
now four database servers running MySQL which are synchronized using master/slave replication. There are four web servers with Nginx and uWSGI
running Pyplate.

I plan on adding another four Banana Pis as web servers. Pages are cached on the web servers, so most pages are served without needing to access
the database. There isn’t much load on the database servers, so it shouldn’t be a problem to have more web servers than database servers.

The web servers are synchronized using rsync. I’ve set up ssh keys so that I can use rsync over ssh without having to enter passwords. The web
root directory and the Pyplate directory are synchronized from a master web server to the workers in the web server cluster.

I’ve moved pyplate.com to the new cluster, and I’m working on new sites that will also be hosted on the cluster.

I’m using Ganglia to monitor both clusters. It’s almost set up the way I want, except the master web server doesn’t appear in the Ganglia UI.
I’ll check the settings in gmond.conf on the node I’m having problems with.

Latest site stats – Alexa rank and visitor stats

It’s now over a week since I got a spike in traffic  from the RPi Foundation’s Facebook and Google+ pages.  Google Analytics now shows that Raspberry Web Server has served 33,000 visitors in the last 30 days, and it’s served a total of 65,000 in that time.

The average time on page is 2 minutes, 23 seconds, and the average number of pages per visit is 1.99.  My site’s Alexa rank is still improving.  The global Alexa rank for my site is 241,000.

The amount of traffic that I’m getting from Google search is increasing steadily, so I need to make sure that my server can handle the traffic.   My server still has plenty of spare capacity, so this shouldn’t be a problem.  

I’ve been writing some articles about Linux basics, which you may find useful if you’re new to Linux.  I’ll be adding more articles in this category over the next few days/weeks.

SQLite temperature logging on a Raspberry Pi

Recently I’ve written tutorials about database programming and CGI programming on a Raspberry Pi. I wanted to write a tutorial that builds on the ideas in earlier posts, so I built a temperature logging system that stores data in an SQLite database, and displays the contents of the database graphically in a web page.

I built a temperature logging system using a Raspberry Pi and a DS18B20 connected to the GPIO pins. I wrote a web script to query the database and display the temperature as a graph. The web UI also displays minimum, maximum and average temperatures. Follow this link to see how I built the Raspberry Pi temperature logger.

Here’s a screenshot of the web UI:

Raspberry Pi web UI

Raspberry Pi web UI for SQLite temperature logging system.

I’ve also written an article about getting a Raspberry Pi web server on-line.  This is a brief guide to making a Raspberry Pi web site visible on line.

 

Pi Repository

I’ve added my site to Pi Repository.  It’s a site that links to all the Raspberry Pi web servers that people have set up.  The owner’s still tweaking the site a little bit, but it looks pretty good.

It hasn’t been up long.  I’m sure there are more Pi servers out there, hopefully they will also register on Pi Repository.

I’ve built a Raspberry Pi cluster and I’m using it to host my site

I’ve wanted to learn how to use a load balanced server for some time now.  I finally got around to buying more Pies so that I could build a cluster, and I’ve set up a PC as a load balancer.

Follow this link to  read the technical details about my Raspberry Pi server cluster.

raspberrypiservercluster

 

It was surprisingly simple to set up.  I hope to get more Pies to add to the cluster, but for the moment, it seems powerful enough.  My server has had over 2000 visitors so far today, and pages are still loading quickly.  I wasn’t sure if such a simple cluster could handle that much traffic, but I think there’s still quite a lot of spare capacity.