4 ms·
Question from a non-technical person. I've been reading a lot about tiny websites on HN (e.g. https://bearblog.dev https://bearblog.dev). Can we use these Rasp
by Mengkudulangsat 6y ago
Question from a non-technical person.
I've been reading a lot about tiny websites on HN (e.g. https://bearblog.dev https://bearblog.dev). Can we use these Raspberry Pis to host them? Are they performant enough? Is setting things up newbie-friendly?
Having your own little corner on the internet that no one can shut down sounds pretty cool.
- bottled_poe 6y agoWhen our dev team was just starting out, we ran the business gitlab instance on a raspberry pi 2 model B. It took a few kernel Params to work with only 1GB of RAM, but it got there. His name was Boris and he was the company’s MVP for several years running :)
- vishnumohandas 6y agoQuestions: 1. What was the highest uptime Boris pulled off? 2. Why did you have to decommission him? Was there an eventual hardware failure? Thanks!
- bottled_poe 6y agoBoris was quite reliable, the only issues we had was when we occasionally ran out of disk space and had to clean up some files... Other than that, he kept quite and solemnly did his work. We actually had a separate CI/CD machine to run gitlab runner jobs.. So, boris just needed to run the gitlab web server. Eventually, once we we had more than a handful of staff, we moved to more substantial hardware. We're now running a multi-node on-premises kubernetes cluster (Boris's big brother is putting in work!). Boris is still functional, but he's retired now. He's now part of the business history to inspire the next generation.
- jgalentine007 6y agoThe idea of someone swiping it and literally walking off with your company in their pocket is a bit funny.
- bottled_poe 6y agoWell... Encryption, backups and the distributed nature of git certainly helps to mitigate those risks.
- redis_mlc 6y agoBetter to rent a $5/month virtual server. But if you want to learn about hosting (web servers, static routing, linux), then DIY. Using at least 2 GB RAM makes life easier.
- boomlinde 6y agoYes, they are definitely fast enough for simple pages to a few thousand daily visitors. I've hosted dynamic websites from home using much more modest hardware and eventually used a first model Raspberry Pi for it. Eventually I moved my sites to a VPS out of convenience. My ISP can't guarantee a static address with my current plan (although I've found it is static in practice so far), and the additional cost of a plan where they can exceeds the cost of renting a VPS. If you have an ever changing dynamic IP allocation, you can still use Dynamic DNS services to update DNS records. I use GoDaddy for my names and AFAIR they provide this service, but there are also free providers that'll give you a subdomain, like https://dyndns.org https://dyndns.org. This requires some additional setup, because you need to update your IP with the dynamic DNS API regularly, for example via a cron job. As for setup, if all you need is static pages you can use Raspbian and just install Apache or Nginx, put your files under /var/www/html and on your router forward some port to port 80 on your Raspberry Pi.
- jmiserez 6y agoJust a heads up, DynDNS hasn't been free for years. Even the most basic plan is way too expensive for what you get. If your DNS provider has a CLI just use that. I use Route53 and a simple cronjob to update it.
- Mengkudulangsat 6y agoWow, these replies seem to indicate it's A LOT more effort than i thought! Nginx? Apache? Cloudflare? Would be nice if the Raspberry Pi kit comes with IKEA-level instructions to do this as weekend project.
- einr 6y agoBack when the entire web was like this, simple websites would be hosted on 50-200 MHz single core machines with RAM in the megabytes. So I don't mean to come off as confrontative but if you can't host a text-based website on a quad-core 1.5 GHz machine with 8 GB of RAM you're doing something seriously wrong. As for setting things up, if you can apt-get install apache on any generic Linux box, you can do it on a Raspberry Pi.
- cluoma 6y agoI've been hosting my own website on an ASUS Tinkerboard for years without issue. Granted it doesn't get many visitors, so not a lot of stress. Sitting behind a free CloudFlare account mitigates a lot of bandwidth usage too.
- ben_w 6y agoIt’s absolutely good enough. My web host will let you rent them as dedicated servers, and has used them as hosts themselves: https://www.mythic-beasts.com/blog/2019/06/22/raspberry-pi-on-raspberry-pi/ https://www.mythic-beasts.com/blog/2019/06/22/raspberry-pi-o...
- benn_88 6y agoI host a static website on a Raspberry Pi 3 and it's been running very well for about 3 years. It's static HTML and it also serves files. It's hosted by a provider with a "Pi Cloud". https://www.mythic-beasts.com/order/rpi https://www.mythic-beasts.com/order/rpi The website is https://www.piwheels.org https://www.piwheels.org - it's a Python package repository for Raspberry Pi users It's served over 20M downloads, which is 70TB. Currently serving 1.2M downloads a month (4.4TB). A cheap VPS would be easier, better and about the same price. But piwheels is a bit of a dogfooding project. But it works!
- elcomet 6y agoThey are completely performant enough to serve small static websites, if you have low traffic (it should be confortable with a few connections per second). I think another limiting factor to look at is your upload bandwith. If it's too low, then it will saturate and your conection will be very slow. Some ISP provide asymetric bandwith (much higher download than upload), so that's not the best case. If you have fiber, then you're absolutely good to go. If your blog is featured on HN first-page, then it certainly won't handle the load with a RPI. But for most blogs, it should be enough.
- timthorn 6y agoIt should be comfortable with a lot more than a few connections per second. I've just benchmarked my Pi4 running Nginx on Raspbian from my laptop over wifi, running Apachebench and obtained 322 requests per second with a 34kB html file (the HN homepage). Running ab on the Pi itself, the CPUs can deliver over 3k rps though of course the network subsystem is an important part of the story.