Page 1 of 1

Re: Pi for a HTTP server?

Posted: Sat Sep 10, 2011 4:08 pm
by SaturnsVoid
I was thinking if i could use a few of these for simple HTTP servers running maybe Ubuntu Server or even RedHat how would it handle? Thoughts?

Re: Pi for a HTTP server?

Posted: Sat Sep 10, 2011 5:59 pm
by Chris
Ubuntu is not supporting R-Pi, and many already plan to use R-Pi's as mini web servers, using LAMP.

Re: Pi for a HTTP server?

Posted: Sun Sep 11, 2011 12:43 pm
by Warringer
The R-Pi is an ARM device. AFAIK there is an ARM port of Ubuntu.

Through there is always Debian to use as server software.

Re: Pi for a HTTP server?

Posted: Sun Sep 11, 2011 2:49 pm
by dhicks
Quote from SaturnsVoid on September 10, 2011, 17:08
I was thinking if i could use a few of these for simple HTTP servers running maybe Ubuntu Server or even RedHat how would it handle?

I imagine Apache should compile and run just fine, although if you're planning to use an HTTP interface to a Raspberry Pi performing some kind of single-user function rather than as a general-purpose web server Apache might be overkill. Smaller web severs are available, but I tend to simply use the HTTP server capability built right in to Python - you can basically write your own web server in about 3 lines of code, perfect for when you just want some way of a user interfacing with watever you've got running.

Re: Pi for a HTTP server?

Posted: Sun Sep 11, 2011 5:06 pm
by obarthelemy
@warringer there is not 1 ARM, but several versions of it. the Pi is ARMv6; which Ubuntu no longer support, so only older Ubuntu versions are usable. Ubuntu have been contacted and have shown no interest in reversing that decision, so the Pi is moving on with Debian, Arch, and Fedora at the moment. Others may join, but that should be plenty already.

Re: Pi for a HTTP server?

Posted: Sun Sep 11, 2011 8:30 pm
by Chris
Quote from Warringer on September 11, 2011, 13:43
The R-Pi is an ARM device. AFAIK there is an ARM port of Ubuntu.

Through there is always Debian to use as server software.

Ubuntu has stated they wont be supporting the ARM11 used in the R-Pi which generally means ubuntu is the wrong choice.

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 3:12 am
by abishur
Fortunately, the r-pi team is not forcing anyone to use any specific linux distro. They're providing an option to use a pre-setup SD card with Ubuntu, but they can choose to change that if the need arises. If anyone wants to use a different distro then they are free to chose whichever distro they feel to be the "right" one ;)

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 7:10 am
by Coburn
I currently run full production websites + subsites off a ARM v5 SheevaPlug on my own internet connection, and they respond quite nicely. The Raspberry Pi would do the same thing, if not beat the SheevaPlug's setup (ARM6 > ARM5) in benchmark departments.

The saying goes, "Debian for your server, other linux distros for play"...

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 8:51 am
by pieter
For a webserver R-pi I would recommend using debian as OS and Lighttpd as webserver.
Depending on your database needs take a look at sqlite3.
The combination of Debian, lighttpd, php5 (via fastcgi) and sqlite3 has served me very well so far.

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 10:14 am
by scologic
pieter - ditto here we tend to use ratpoison as a base xwindows manager also.

Mark.

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 6:46 pm
by langlo94
Hmm considering the fact that this is using a cellphone chip, could you use a cellhone OS?

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 7:51 pm
by Val67
Just use Linux with nginx (apache seems too heavy)

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 7:54 pm
by ErvKosch
@langlo94 - I kinda been wondering the same thing. I'm pretty sure some version of Windows CE/Mobile is compatible with the processor. I'm not saying anything about the display drivers. But heck, the Sega Dreamcast was powered by Windows CE.

Re: Pi for a HTTP server?

Posted: Mon Sep 12, 2011 8:30 pm
by Svartalf
Quote from ErvKosch on September 12, 2011, 20:54
But heck, the Sega Dreamcast was powered by Windows CE.


No... It had it AVAILABLE- but only 2-4 titles ever used it as the OS for the console. Seriously.

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 2:42 am
by SaturnsVoid
So how about a base Linux distro, make a simple script (maybe python, java?) and port foreword 80... IDK...

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 9:40 am
by WASD
Can anyone guess how many users it would be able to handle? Lets say you run something light as nginx or lighttpd. Would 10 users at the same time work fine? If you just have something simple like a forum.got

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 9:49 am
by hsalonen
Any university level CS student can code a simple HTTP-server during one weekend. It'll be simple and serve files from filesystem. This is just saying, that HTTP is not awfully complex and resource hog. The nginx and lighttpd just add features, I think their memory compsumption (which is the biggest problem) remains moderate.

You just want to serve content. I doubt any forum is a static HTML-page. You'll have a database, which requires indexes, cache and all that funky stuff in memory. And you are probably running some scripting framework (say.. PHP?) and that consumes some memory, too..

Nobody does just HTML and HTTP these days, give more specs..

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 10:16 am
by Coburn
I'm sure you could get away with running Debian + lighttpd/cherokee/nginx + php (fastcgi) + sqlite3 on the 'pi itself and host your own forums using MyBB or phpBB. I run my SheevaPlug off USB Flash, and it does mySQL, PHP, lighttpd, GD and a crapload of other things.

Don't view the 'pi as a slow device - ARM performs beautifully in the server department. My sheevaplug has been pumping out megabyte after megabyte of PHP-powered site content - there's no stopping it.

EDIT: You could also fit mySQL into the mix - however you'd want to disable InnoDB for a massive memory saving.

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 12:34 pm
by pieter
I only use mysql when absolutely necessary (for example when running wordpress).
On a sheevaplug (or it's family) with 512mb it runs without problems but I wouldn't want to run it on a server with 256mb memory (let alone 128mb). And I suspect that sqlite3 is saver to use than mysql without innodb (sqlite3 even has foreign keys now, something myIsam (mysql default) doesn't have :-)

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 3:28 pm
by Ren
If running PHP, 5.4 has its own builtin web server, not sure I would want to use it for anything large, but over the LAN with limited users it'd probably be fine.

Node.js would be interesting, already various ARM ports (debian)
Can create a web server is a few lines, and have the option for also dealing with WebSocket.

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 5:02 pm
by WASD
Quote from Ren on September 13, 2011, 16:28
If running PHP, 5.4 has its own builtin web server, not sure I would want to use it for anything large, but over the LAN with limited users it'd probably be fine.
I don't think the network speed matters very much. The raspi has a 100mbit ethernet card. If you have super-fast internet or are on a LAN, that will be maxed. And it is the rest of the hardware that matters.

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 6:54 pm
by abishur
Not to nitpick, but it's actually a USB to Ethernet adapter attached the LAN9512 chip that shares the USB bandwidth with the USB ports ;) That said I fully agree with your statement, even with a hard drive on the USB port, your ethernet speeds should manage.

Re: Pi for a HTTP server?

Posted: Tue Sep 13, 2011 10:32 pm
by Ren
Quote from WASD on September 13, 2011, 18:02
Quote from Ren on September 13, 2011, 16:28
If running PHP, 5.4 has its own builtin web server, not sure I would want to use it for anything large, but over the LAN with limited users it'd probably be fine.
I don't think the network speed matters very much. The raspi has a 100mbit ethernet card. If you have super-fast internet or are on a LAN, that will be maxed. And it is the rest of the hardware that matters.

I was referring more to the PHP web server being relatively new, and hasn't been implemented with the intention of serving large number of users.

Re: Pi for a HTTP server?

Posted: Sat Sep 17, 2011 10:52 pm
by scologic
one point for education... We do all our app dev for local use on a plug computer where we use php to access ports etc etc etc. It makes development rapid, why not teach php sqlite running on local PI in a window manager like ratpoison in kiosk mode. The port 80 functionality of http server is a bonus for remote box management in our cases.
Either way this is a widely used language, mainly open source and crosses a lot of boundaries.