News for hackers. Stuff that matters.
Re:I wish my web server were in the corner of my room by Manu40 on Tuesday October 11, 2022 @08:54PM (#33171332)
Hi there. I have a R-pi vs 2, and I'm wondering how well you think that would hold up for a basic blog site. It doesn't need to be super fancy, but I would like it to at least be a little nicer looking and just a little more complex than for example Ycombinator.

Is this worth while to do? I'm concerned about using a pi, because micro-sd cards seem to be notoriously bad for corrupting data in less than ideal power situations.

Re:I wish my web server were in the corner of my room by joeblubaugh on Tuesday October 11, 2022 @10:51PM (#33172184)
You can always plug in a spinning disk. I used an RPi Model A to stream HD video off an HDD for around a year and it worked just fine. Keep an image of your SSD in case it gets corrupted and you need to reinstall.
Re:I wish my web server were in the corner of my room by Manu40 on Wednesday October 12, 2022 @01:22AM (#33173188)
Okay, so forgive me if this is a dumb question, but I thought the R-pi 2 requires the OS to be on the micro-sd to boot and can't use USB or PCI adapter connected drives?
Re:I wish my web server were in the corner of my room by joeblubaugh on Wednesday October 12, 2022 @07:04AM (#33175228)
Yes, that’s true. What I was suggesting: * put the OS on the sd card. * Put all the data on an external drive that is more reliable. * Take a snapshot image of the sd card when setup is complete. If your sd card is ever corrupted you can use the image to restore the server.
Re:I wish my web server were in the corner of my room by Manu40 on Wednesday October 12, 2022 @01:48PM (#33180468)
Oh, okay. Thanks.
Re:I wish my web server were in the corner of my room by lucb1e on Thursday October 13, 2022 @06:53PM (#33197518)
> I have a R-pi vs 2, and I'm wondering how well you think that would hold up for a basic blog site.

Whether it could survive a lot of pageloads, like when submitting to HN and it gets traction, 100% depends on the blog software.

It won't run Wordpress well because that software is ridiculously heavy, and I frankly don't have good examples of database-based blog software aside from something I wrote myself. Mine still does multiple mariadb queries per pageload, so it's not as though it's extremely lightweight, but page generation comes out to a few milliseconds on a laptop with a CPU from 2012 inside. This software would survive the HN homepage easily.

I would estimate that anything that can handle >10 requests per second will survive the HN homepage, but if you're on the edge of 10r/s then perhaps it might be slower during the busiest minutes. If you would use static page generation (like jekyll, though I'm personally not a fan of how jekyll works it's the most well-known example) then the pi will definitely survive serving those static pages easily.

> I would like it to at least be a little nicer looking

The looks don't make it heavier or less heavy. Having a few style rules applied to the page is a few extra bytes per pageload, but they're not going to make the difference between it working or it not working.