Jump to content

Welcome, Guest!

webpi

Banana Pi server cluster

Recommended Posts

I built a Raspberry Pi cluster a while ago, and it's been running really well.  I got my hands on 4 Banana Pis a month ago, and I thought I'd build another cluster.  This time around I've used Nginx instead of Apache.  I'm using a CMS I wrote myself called Pyplate.  The latest version is much more efficient than the version I used in my RPi cluster.  

 

The Banana Pi is a lot more powerful than a Raspberry Pi because it has a dual core SoC running at 1GHz, and it's great for web servers because it's got gigabit ethernet.  The Banana Pi also has a SATA port, but I'm just using SD cards for simplicity.

 

Check out my site at Banoffee Pi Server.

 

 

tumblr_n9fdcgesgg1so209ao1_400.jpg

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I've taken some new photographs of my server clusters now that I've got them set up the way I want:

 

tumblr_n9kuxd7jNZ1so209ao1_400.jpgtumblr_n9kuxd7jNZ1so209ao2_400.jpg

 

The Banana Pi servers are in the rack on the left.  The other two racks have Raspberry Pi servers in them.  The PC at the bottom of the stack is the load balancer which distributes requests to the clusters.  At the top, there's a large ethernet switch that links the servers and the back end of the load balancer.  

 

I have another server that's running a small forum which needs to be able to send emails to users when a thread is updated.  The server can't connect to the internet directly because it's behind the load balancer.  I added the small switch and router at the top of the stack to forward traffic from the server subnet to the local network.  This allows the forum to send emails to users.  

 

There's another router that's not in these pictures that connects my local network to the internet.

 

Check it out at http://banoffeepiserver.com/banana-pi-server-cluster/

Share this post


Link to post
Share on other sites

I've built two more Banana Pi clusters - one is a replicating MySQL database cluster, and the other is running the GlusterFS distributed file system.

 

The MySQL Banana Pi cluster is made from 4 Banana Pis running Raspbian:

 

tumblr_nchrgnzGIL1so209ao2_500.jpg

 

The Banana Pi storage cluster also has four hard disks attached to it:

 

tumblr_nchrgnzGIL1so209ao4_500.jpg

 

GlusterFS allows four separate servers to be used as a single storage volume.  I've set up GlusterFS to replicate data so that no data will be lost if a hard disk dies.

 

Eventually I'm going to modify the server cluster to work with the database and storage clusters.  Watch this space.

  • Like 1

Share this post


Link to post
Share on other sites

I've spent more time working on my Banana Pi powered MySQL cluster.  I've written a tool called DB Cluster Utils to manage the cluster from the command line.  I have a separate Banana Pi which I use as a control node to administer the cluster.  I can use the DB Cluster Utils (db_cluster_utils.py) command to demote a master server, promote a new slave, add new servers to the cluster and a few other things.

 

You can read about it here: http://banoffeepiserver.com/mysql/python-database-cluster-management-utility/. The code is on github at https://github.com/Pyplate/db-cluster-utils.

 

Eventually I'm going to use the database cluster in banoffeepiserver.com. At the moment that site is powered by a cluster of web servers that each have a copy of an SQLite database.  Moving to a MySQL database will allow me to offload database processing from the web servers, so the site should be able to handle more traffic.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

Bringing you the latest Raspberry Pi news, tutorials and user forum.

The Fruity Computer

×