Tag Archives: cluster

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.

I’ve published a new web site

I’ve published a new site on my Banana Pi cluster. It’s called Linuxwebservers.net. I’ve started by writing some posts about Apache and its configuration files. I’ll write some basic articles about Nginx next, and then I’ll write some articles about setting up different web development programming languages.

I’m still thinking about using Gluster in the Banana Pi cluster. I’ve read that offloading file access to network storage can improve the performance of web server nodes, especially when the storage nodes have fast storage like SATA 3 hard disks, and the server nodes have slower storage in the form of class 10 SD cards.  I have a feeling that performance won’t be as good as it is with content stored locally on each server, but there’s only one way to find out for sure – I need to set it up and try it.

There is a new blog on pyplate.com at blog.pyplate.com. It’s a journal of Pyplate related work that I’ve been doing recently, and it is also hosted on the Banana Pi cluster. I still need to do some work on the blog. The publishing date needs to be displayed underneath the title of each post. I also need to reverse the order that posts are displayed in, so that newer posts will be at the top of the page.

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.

Using Ganglia to monitor three Banana Pi clusters

I’ve done some testing of the Ganglia monitoring tool on three small Banana Pi clusters.

three Banana Pi clusters monitored by Ganglia

Ganglia grid overview

I used a cluster of four database servers, another cluster of four nodes running GlusterFS, and a cluster of two master nodes.

The Ganglia meta demon has to be installed on the master node (the node where Ganglia stores data and the web front-end).  Some configuration changes need to be made in /etc/ganglia/gmetad.conf:

  • set the ‘gridname’ directive
  • add data_source lines for each cluster
  • add a list of IP addresses to the trustedhosts directive

The data_source directive specifies the name and host/port details of a cluster.  There is one data_source line for each cluster.

The Ganglia monitor needs to be installed on each node.  It’s configuration file (/etc/ganglia/gmond.conf) also needs to be edited:

  • edit the cluster name
  • change the port number that the monitor uses to communicate with the master node.

Ganglia uses different ports to distinguish between different clusters, so the ports in gmond.conf should be the same for every node in a cluster, and each cluster needs to use a different port.

You can read about the details here: http://banoffeepiserver.com/server-monitoring/ganglia/set-up-ganglia-on-multiple-clusters.html.

Python utility for managing a cluster of database servers

I’m still working on some code to manage replication on a cluster of Banana Pi MySQL servers. It’s coming on quite well. I’ve got to a point where I can

  • demote a master,
  • promote another master,
  • add servers to the cluster,
  • copy the database to another server.

I’ve published the code on Github at https://github.com/Pyplate/db-cluster-utils.  There’s information on how to use DB Cluster Utils on my Banana Pi site at http://banoffeepiserver.com/mysql/python-database-cluster-management-utility/.

I was contacted earlier today by the owner of tinyonestore.com, asking if I would mind if they linked to my site from their site. I guess they wanted to check that they weren’t going to swamp my site with traffic, but that hasn’t been a problem so far. Looks like they have some interesting products like the Radxa Rock Pro.

My latest site, BanoffeePiServer.com, has been running smoothly since I set it up. I’m really pleased with its performance. At the moment it’s hosted on a small cluster of Banana Pi servers. I now have 10 more Banana Pis, so I’m planning on building a more sophisticated cluster.

I’ve been working on adding support for MySQL to Pyplate. This will mean I can set up a cluster of database servers, and offload the database from the nodes running the Nginx.

I have got as far as setting up a MySQL database and importing data into it. I’ve modified Pyplate to remotely access the MySQL database instead of the local SQLite database.

Next, I need to set up three more database nodes, and set up database replication. Then when I make changes to one of the databases, the changes will automatically be flushed through to the other database nodes.

I’ve got a lot more testing to do, but eventually I will release an update of Pyplate with added support for MySQL.

Once I’ve installed the MySQL cluster, I’ll look into setting up four more nodes running the Gluster distributed file system.

ARM powered server farm

My Banana Pi site has been up for a few days now, and I’m very happy with its performance.  I’ve put my clusters together to form a nice neat stack:

ARM server farm

ARM server farm

The Banana Pi servers are in the rack on the left.  The other two racks contain Raspberry Pi servers.

Banana Pi and Raspberry Pi server farm

Banana Pi and Raspberry Pi server farm

You can read about how I set up the Banana Pi cluster here: http://banoffeepiserver.com/banana-pi-server-cluster/.