wowfood
Posts: 4
Joined: Thu May 24, 2012 3:25 pm

Webserver feasability

Thu May 24, 2012 3:32 pm

Okay I know that the rasp isn't the best option for a webserver, I wanted to create something small and extensible I could host from home. I also wanted to experiment with handling a webservers back end so in the future I could grab an unmanaged server since they're hella cheap compared to managed ones. Anyway

My idea was to get a couple rasp pis,and create a load balanced cluster, so say two for load balancing and another four or so for serving up content. I know that the biggest limitation would be database operations due to the limited RAM (although saying that I doubt any sites I make will get large enough to have RAM issues involving the DB). But can anyone think of any other major limitations I might be overlooking?

I've already made considerations of which server to use, considering nginx due to the small footprint and ease of configuration. Also been looking at linux distros trying to find one which is lightweight. (hoping DSL or puppy might be on Rasp Pi by the time I get one)

Are there any other areas I've overlooked? If so let me know, right now this is just a "might happen if I buy one" situation.

--edit--

Actually saying about the lack of RAM, most VPS I've seen seem to have less RAM than the pi, so that might not be an issue either. Either way still looking to keep it as light wegiht as possible.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Webserver feasability

Thu May 24, 2012 4:52 pm

If you do a search for web servers you'll find a bunch of posts on this plus some links to Pi's already serving pages on the interweb.

Unless you are going to launch a product early in the morning and may get more traffic than you can imagine, a cluster will probably be overkill. But still nice to learn how to setup & manage.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Webserver feasability

Thu May 24, 2012 5:00 pm

how much traffic are you thinking you're going to put through?

wowfood
Posts: 4
Joined: Thu May 24, 2012 3:25 pm

Re: Webserver feasability

Fri May 25, 2012 7:35 am

hardly anything. I just wanted to create a small cluster so i can experiment on the cheap side for future use. I mean, a cluster of 6 RPis would cost me what, £160 including the 10/100 switch?

vs building a single computer to host it which would cost me around £120 but takes up more space and draws more power, and isn't extensible.

And who knows, I could make the next facebook. Not likely but one can always dream right?

User avatar
alexandru.cucu
Posts: 75
Joined: Mon Sep 05, 2011 6:07 pm
Contact: Website

Re: Webserver feasability

Mon May 28, 2012 10:52 am

MySQL settings can be configured to reduce memory usage.
http://www.lowendbox.com/blog/reducing- ... end-boxes/

Also interesting:
http://www.lowendbox.com/blog/yes-you-c ... ink-1-vps/

And a benchmark of the Raspberry Pi:
http://bryanquigley.com/uncategorized/r ... ld-dell-p4
https://launchpad.net/~alexandru.cucu

gluffis
Posts: 2
Joined: Wed May 30, 2012 5:55 am

Re: Webserver feasability

Wed May 30, 2012 6:13 am

I was thinking roughly the same , doing web clusters on Raspberry machines. Mostly because I don't need the performance just a bunch of machines to test stuff on. 10-15 Raspberry's will require just fraction of power compared to my HP DL360 that is acting as virtualization host now.

I compiled and ran Nginx without any problems last night on the default Debian install, going tho get php running tomorrow I hope. I will be running the database on my 'powerhouse' Via C7 based machine ;)

I really don't see the need to strip the OS since I will only run what I need. Kernel is module based and will only attach needed modules so there is no point in running lightweight distros unless you have limited storage.

adlambert

Re: Webserver feasability

Wed May 30, 2012 7:39 pm

A Raspberry Pi does a good job of hosting a web server for a low number of users and will handle PHP and MySQL.

The beauty of it is as a personal webserver, on the end of your broadband with port 80 forwarded, is that it can be left on 24x7, uses minimal power and generates no significant heat and there is no fan noise.

User avatar
colin
Posts: 3
Joined: Fri Jun 01, 2012 1:49 am
Location: Iowa, USA
Contact: Website

Re: Webserver feasability

Fri Jun 01, 2012 1:54 am

I don't see a problem running a webserver on a Raspberry Pi. You could have around 1000 unique visitors a day and have no server slowdowns or etc. The only problem with hosting it on a pi would be how many people are using you're site at a time.

Still a pi would not be the best choice for a heavy site or a high traffic one.
My site is on an 8 year old Dell (with 512MB of RAM, with usually around 256mb of ram not in use because I use the PC for other things) and it runs my site just fine.

pieter
Posts: 34
Joined: Mon Aug 22, 2011 7:12 am
Contact: Website

Re: Webserver feasability

Fri Jun 01, 2012 10:09 am

I've got a home webserver runing on a guruplug.
The debian/lighttpd/sqlite combination really works well in a memory limited environment.
It even worked on my old NAS with only 128Mb :-)

In my experience the most memory hunger part of a lamp stack is mysql, sadly a lot of websoftware (looking at you wordpress) demand a mysql server. In my own developed software I prefer to use sqlite. For software designed to run on a limited device like this sqlite should be powerfull enough.

User avatar
colin
Posts: 3
Joined: Fri Jun 01, 2012 1:49 am
Location: Iowa, USA
Contact: Website

Re: Webserver feasability

Fri Jun 01, 2012 8:50 pm

pieter wrote:I've got a home webserver runing on a guruplug.
The debian/lighttpd/sqlite combination really works well in a memory limited environment.
It even worked on my old NAS with only 128Mb :-)

In my experience the most memory hunger part of a lamp stack is mysql, sadly a lot of websoftware (looking at you wordpress) demand a mysql server. In my own developed software I prefer to use sqlite. For software designed to run on a limited device like this sqlite should be powerfull enough.
PHP actually comes with SQLite (it does on Windows,) so it really does not cause any server load.
I also prefer SQLite just because it's fast and lightweight, perfect for a Raspberry Pi.

Return to “Networking and servers”