Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Raymii.org got reddited, lwn-ed and news.ycomb-ed, on a 128MB LEB, with stats!

Raymii.org got reddited, lwn-ed and news.ycomb-ed, on a 128MB LEB, with stats!

RaymiiRaymii Member
edited July 2012 in General

So, I have this article on my website about small Linux / ARM pc's like the Raspberry Pi. Heres a link to it

Now on sunday the 15th I submitted that to the http://reddit.com/r/linux reddit. To see my visits go up from about a hundred a day to twenty-thousand... I was shocked, happy ad hoped my little RAM host vps (128MB ram, 128mb burst, 25gb disk, 350GB bw, lighttpd) would hold. And it did, it was like, is this all ya got?

Now note that my website normally has about 100 visitors a day, as the Piwik stats say:

image

And this is how the spike looks in Piwik:

image

Awesome right? Same period as above, visitors / hour:

image

Now the Munin stats, how did the server hold up? Stats by week, from HostedMunin

Load average

image

Memory Usage

image

Lighttpd traffic

image

CPU Usage

image

Firewall

image

HTTP Loadtime

image

Where did it came from?

Here's a screenshot of the referrer list from Piwik:

image


Now, the server held up pretty well, all of the uptime monitors did not report any failures. But I had some spare time, so I utilized some vps' I have, and it now runs in a round-robin DNS, webroot on a GlusterFS replicated filesystem, lighttpd + php5 + SSL, automated git deploy cluster-thingie. You can notice via this on the bottom of every page: Cluster Host: 81.30.145.69.

Now, the next thing is to get hit again, and see how it holds up in the semi-cluster setup.

What do you guys/gals think about it?

Here's a link to all the images, since LET does not get my markdown links to images:

http://imgur.com/a/qZqTo

Quis custodiet ipsos custodes?
https://raymii.org - https://cipherli.st
Thanked by 1lbft

Comments

  • gsrdgrdghdgsrdgrdghd Member without signature
    edited July 2012

    Impressive :) Do you know how the loading time held up?

    @Raymii said: webroot on a GlusterFS replicated filesystem

    Will that sync the files you put in one server's root folder to every other server in the cluster?

    btw you can use html img tags to link your images.

  • RaymiiRaymii Member

    image

    Thanks for the tip on html code. Load time is added, also from the munin graphs. While the raid, it was night here in the Netherlands, and I'm still doing a lot of night shifts, I was working then.

    The glusterfs server runs on all the webservers, a volume on /gluster-raymii. (and on 3 other vps's which are not frontend webservers). The glusterfs client runs on the webservers and my git machine and my local boxes, and mounts the glusterfs volume on /var/www/glusterroot. Lighttpd's webroot is that, and the git deploy also shits there after a master branch push. The volume is replicated, meaning almost the same thing as RAID 1, only via software, TCP/IP and FUSE, all the files are acessible everywhere from the clients. If I wanted I could also mount it via NFS or SMB... If server 1 creates a file, server 2 to 8 can edit it and it is the same on all the servers... Very awesome.

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • NanoG6NanoG6 Member

    @gsrdgrdghd said: Impressive :) Do you know how the loading time held up?

    Will that sync the files you put in one server's root folder to every other server in the cluster?

    Ya I'm curious about that too. Do you use PHP-FPM?

  • RaymiiRaymii Member

    If the volume is replicated, (not striped) and the clients mount the volume as the webroot then yes, everything is on all the servers. It is not synced (the server has the files, you access them via the gluster mount, so it is synced but not synced, quite complex, it is real-time up-to-date, with things like file locking and such, via xattrs.) Does require FUSE support on the openvz vps.

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • JarJar Member

    Great share. That should add to a lot of people's confidence in their choice of a low end system. Solid content too, wish I had time to sit and read the whole article. Actually just surprised I have Internet here, though I did have to hang my iPhone in the window with a clothes hanger, but that's another story.

  • PresbytisPresbytis Member
    edited July 2012

    This. Sometime i want to test how a site hosted on lowendbox will handle reddit+newsyc effect, but i don't have any idea what site to host that can make people interested.

    Congratulations!

  • joepie91joepie91 Member
    edited July 2012

    @NanoG6 said: Ya I'm curious about that too. Do you use PHP-FPM?

    Considering it's lighttpd, I'd suspect it's a fastCGI setup. You'd have to confirm that with @Raymii though.

    EDIT: Also, @Raymii, congratulations :)

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • RaymiiRaymii Member
    edited July 2012

    apt-get install lighttpd php5-cgi nano /etc/php5/cgi/php.ini uncomment cgi.fix_pathinfo=1 lighttpd-enable-mod fastcgi lighttpd-enable-mod fastcgi-php

    So, I think it is a fastcgi setup @joepie91 but I thought php-fpm also was using fastcgi? @NanoG6

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • KuJoeKuJoe Member

    @Raymii, could you post your lighttpd.conf file by chance? I'd be interested to see your config for that kind of traffic. :)

    -Joe @ SecureDragon - LEB's Powered by Wyvern in FL, CO, CA, IL, NJ, GA, TX, and AZ
    Test our network here: Drgn.biz
  • RaymiiRaymii Member
    edited July 2012

    @KuJoe here's my config: http://is.gd/XeRSzN or if you hate short urls http://www.0bin.net/paste/8cd81f6be590a25c02b13e3957a0b42b579650c4#3pL4jjVEGqhqyRyPxgbcf9HqvhzAfyvgpENRbM3ZqAc=

    I think this is what you're most interested in:

    server.max-keep-alive-requests = 20 server.max-keep-alive-idle = 15 server.max-read-idle = 15 server.max-write-idle = 15 server.max-worker = 1 connection.kbytes-per-second = 1024 server.kbytes-per-second = 4096 evasive.max-conns-per-ip = 250 server.max-request-size = 512 server.range-requests = "disable" server.follow-symlink = "disable" server.force-lowercase-filenames = "disable"

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • KuJoeKuJoe Member

    I didn't see anything about PHP, do you have a separate config file for that?

    -Joe @ SecureDragon - LEB's Powered by Wyvern in FL, CO, CA, IL, NJ, GA, TX, and AZ
    Test our network here: Drgn.biz
  • RaymiiRaymii Member

    The only change I make to the php config file (/etc/php5/cgi/php.ini) is uncomment the fix_cgipathinfo line.

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • KuJoeKuJoe Member

    Actually I meant the fastcgi configs. I've been tweaking mine seeing if I notice any improvement but so far I've only found settings that cause instability. I was going to resort back to the default settings but I'm interested to see your settings with that kind of traffic.

    -Joe @ SecureDragon - LEB's Powered by Wyvern in FL, CO, CA, IL, NJ, GA, TX, and AZ
    Test our network here: Drgn.biz
  • RaymiiRaymii Member

    I don't know if I changed those, and if I did, it has been a long time ago, the vps is almost 2 years now :)

    Here's the /etc/lighttpd/conf-enabled/10-fastcgi.conf: http://0bin.net/paste/18513ef911b4e2aee37909b50e3950ca8f82b3a5#DVXsIS5jO5JHrfYdQBQ2v/sbYyynoj/1iS45GnUIqRw=

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • @Raymii said: So, I think it is a fastcgi setup @joepie91 but I thought php-fpm also was using fastcgi? @NanoG6

    Yes, but php-fpm uses a separate process manager whereas php-fastcgi uses the built-in process manager in lighttpd (which, in my experience, gives better results).

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • Very nice!

    Reviews | Website | Projects (Minstall, Scripts, etc)
  • AsimAsim Member

    Nice, congrats. Keep up the good work :)

  • RaymiiRaymii Member

    @joepie91 said: Yes, but php-fpm uses a separate process manager whereas php-fastcgi uses the built-in process manager in lighttpd (which, in my experience, gives better results).

    I did not know that about php-fpm, thanks. And as I saw, this setup holds quite well under some load. I don't know how cryto holds, or yunnicc, is that the same setup?

    @maxexcloo @Asim thanks

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • hienhien Member

    @Raymii Any GlusterFS performance issue on high load ?

  • ramnetramnet Member

    @Raymii said: To see my visits go up from about a hundred a day to twenty-thousand... I was shocked, happy ad hoped my little RAM host vps (128MB ram, 128mb burst, 25gb disk, 350GB bw, lighttpd) would hold. And it did, it was like, is this all ya got?

    Thanks for the positive feedback! We're happy you're happy.

    That's quite an interesting idea clustering multiple vps's together like that.

    Hopefully we'll see an article on your website about how you did that :-)

    RAM Host - Premium Affordable OpenVZ & KVM VPS. Repeatedly Voted Best LowEndBox Provider
  • RaymiiRaymii Member

    I've now changed it to a rsync script, now via cron but it will go in the git post-receive hook deploy thing. I have three lower-end nodes which were starting to swap because of gluster. Was eating up almost 40mb of ram, and if you have 64, then lighttpd gives you the finger...

    @hien well since I've been hit, I haven't been hit again so I would not be able to tell. Visits are now up stable 600/1000 a day instead of 100 :)

    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • RaymiiRaymii Member
    Quis custodiet ipsos custodes?
    https://raymii.org - https://cipherli.st
  • This makes me swell with lighttpd pride. Thanks for sharing your configs, and congrats on all the traffic! I've taken notes for my low end configs.

  • JTRJTR Member

    Pretty impressive! The most traffic I've ever seen was around 8k hits in 24 hours for a video I mirrored on reddit, but all the load was absorbed by my dedi's Varnish cache — apache saw maybe two requests in all (although since then I've reduced the caching time by quite a bit — 24hr to 1hr).

Sign In or Register to comment.