Jump to content

Welcome, Guest!

webpi

Raspberry Pi web server

Recommended Posts

I have a web site at Raspberry Web Server.  It's running headless, and I'm using Apache.  

 

I'm using a CMS that I wrote myself.  It's written in Python, and I've written some fairly advanced features like page caching and SEO friendly meta data.  

 

I'm only halfway through writing the back end.  I've written pages that I can use to adjust site settings and add new pages.  I need to write a few more scripts to do user management and manage all the pages in the site. 

 

I've set up an old PC as a load balancer, and I've just ordered three more Pies.  Soon I'll be running my site on a small cluster :D .

Share this post


Link to post
Share on other sites

I checked out your site. Nice information.

 

So a couple of questions. Why not try a PI for a load balancer with a USB Ethernet dongle as eth1? And why not use an NFS mount for shared web content, instead of each web server having duplicate content?

Share this post


Link to post
Share on other sites

I've never worked with a load balanced server before, so I wanted to keep it fairly simple to begin with.  I didn't know how much processing power the load balancer would need so I thought I'd start with an old PC.  And I wanted to use all the Pies I have as server nodes.  When I can get my hands on another Pi I might try setting it up as a load balancer.  

 

I didn't use NFS because I thought this would increase the overhead on each file that gets served, and I didn't want the file server to be a bottleneck.  

 

Once I'm a bit more familiar with this technology I may well end up implementing the changes that you suggest.

Share this post


Link to post
Share on other sites

Haha! Well I really wasn't suggesting, as much as was just curious. Looks good, and I would be interested in hearing about you Load balance if you push a PI that way.

Share this post


Link to post
Share on other sites

I've been tuning Apache and making various improvements in my Raspberry Pi cluster.  I've unloaded unused modules, and increased the number of server processes.  

 

Testing with siege shows a reasonable increase in performance.   The maximum transaction rate used to be 460 transactions per second, but now it's around 940 transactions per second.

Share this post


Link to post
Share on other sites

My cluster's been running quite nicely for a few months now.  Performance seems ok, but there's always room for improvement, so I did some on site optimization to make pages load more efficiently.  I hardly made any changes to the server configuration.  These tuning enhancements were all about modifying my CMS and the HTML template for my site. There's still room for improvement, especially with the Reddit sharing button, but I think performance is a lot better.  Some of the page plugins take a while to load, but the HTML for each page loads and renders pretty quickly.

Share this post


Link to post
Share on other sites

It's important for my site to be as fast as possible, so I didn't want to add the overhead of serving content from NFS.  The script that I use to sync servers is pretty simple, and I've set up a button in the admin area of my site that I can click to sync the servers when I update the site.

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

×