TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Do you use FreeBSD as web server? Why or why not?

69 pointsby kiloreuxalmost 9 years ago

31 comments

toddnnialmost 9 years ago
Yes, because it is a great platform to learn system administration. First, it&#x27;s so simple that eg. it takes only few lines to automate installation or create a customised internal repository. Second, the documentation.<p>edit. And oh yes, the memory usage of the default installation is so low, that you can virtualize dozens of them on your laptop. This helps when you want to locally reproduce the stack you run in cloud.
_kp6zalmost 9 years ago
Yes, I use it for my personal web servers. I completely rid myself of Linux when Debian switched to systemd. I run nginx for static and proxy services. I wrote some Scala&#x2F;Play apps that I run in jails on OpenJDK8. I run some open source PHP, Python, Ruby and C and perl CGI scripts for various admin things and &quot;cloud&quot; things but all on my own hardware. I use iocage to manage the jails. I replicate the jails between two physical servers asynchronously, and also send them to my house for an off site. I run PostgreSQL on the two servers in a failover setup with WAL shipping. It takes about 30 minutes a month to keep security patched. I use saltstack to manage as much as possible. It took about 2-3 weeks to set everything up using just evenings and weekends, it&#x27;s a lot more hacky than stuff I do for dayjob because I&#x27;m the only one that needs to understand the setup so I can elide some robustness I&#x27;d use in a team environment (i.e. no test suite, no branches, no CMDB just simple text files assigning roles, no multi-platform or abstractions everything is decisivly coded for my tech stack of choice like FreeBSD, Postfix, Dovecot, PostgreSQL)<p>I also use it at work. The scale is much different as one of the largest CDNs, the network interface stats are eye popping. This is proprietary caching software and nginx and apache for certain types of origins or admin services.
chao-almost 9 years ago
No.<p>I have a high tolerance for trawling through documentation and reading the code of open source libraries in pursuit application logic and the fiddly bits of related services. I have low tolerance for the same work in pursuit of infrastructure configuration and systems administration.<p>I run various flavors of Debian and Ubuntu across a desktop, 2 laptops and a home server (various audio&#x2F;video projects). Thus I tend to default to the familiarity of these systems, and get back to the part of the stack I enjoy working in. Another word for this might be &quot;laziness&quot;, but that doesn&#x27;t quite tell the full story.
评论 #11805103 未加载
评论 #11805013 未加载
dangalmost 9 years ago
HN does, because pg and rtm liked it from way back, we inherited it, and it works well.
评论 #11805144 未加载
评论 #11804908 未加载
mrsirdukealmost 9 years ago
I started out using fbsd back when 4.4 was a thing, and the performance was much better than anything GNU&#x2F;Linux could do, for running Apache.<p>Back then fbsd had something called accept filters, which basically made the accept call only return when a http request was received in the network buffers.<p>Systems running fbsd loaded up different than Linux, kept being responsive. On same hardware, could do 3-5x more rps with lower load iirc.<p>As my applications at the time became more cpu bound, I switched to Debian around 4.11.<p>I&#x27;ve recently been using 10.x, coming back to fbsd from 10 years of Debian. I love what you&#x27;ve done while I was gone. Especially binary packages and easy upgrades, but especially jails and zfs.
synthmeatalmost 9 years ago
Yes, on a small fleet of node.js (and some other services) VPS&#x27; on DigitalOcean in production, after a year or so playing with it for personal playthings.<p>Default system uses less memory than Ubuntu (~50MB last time I checked which means something on .5, 1GB RAM instances). I could swear memory consumption in general has fallen down, but haven&#x27;t done any measurements.<p>I don&#x27;t have to jump all over the web to figure out how something works - I just go to handbook. Which means one gets tendency to study topics instead of copy-paste snippets from around.<p>Since base system (maybe things were different before) does not abruptly change or pull the rug under your feet, combined with handbook studies, this has the effect of compounding knowledge that&#x27;ll be effective in years to come.<p>Firewall (pf) is a thing of beauty. I&#x27;ve barely scratched the surface of it.<p>Base&#x2F;userland abstraction split, as well as consistency throughout the system helps one maintain a solid mental map of the system. After a short while, you just <i>know</i> where stuff is, how to configure it, and where its defaults are even when you&#x27;re in completely new territories.<p>Bonus: You can really go the distance without compiling anything, but if you&#x27;re keen on maintaining a low memory profile by dropping various features from your packages, this is a great new build system I use to have all my pkgs up to date - <a href="https:&#x2F;&#x2F;github.com&#x2F;jrmarino&#x2F;synth" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jrmarino&#x2F;synth</a>
retrogradeorbitalmost 9 years ago
Yes. Because it is simpler. Less moving parts. This means more predictable interaction between components. No systemd. Slightly more efficient and faster. Quicker startup. And ZFS is useful for snapshots.
dallbeealmost 9 years ago
Absolutely. It&#x27;s the only OS where I can be certain that I know where everything is and how everything works. It has few deviations from the Unix architecture and the ports repository enforces adherence to the filesystem layout.<p>I don&#x27;t buy into the &quot;increased performance&quot; though. Every well done benchmark I&#x27;ve seen is at least several yaers out of date, and my personal benchmarks usually put linux ahead on any sort of operations that include networking. Not to say FreeBSD doesn&#x27;t perform well, it does.<p>Simplicity is key.
officialchickenalmost 9 years ago
Yes because it has lower response latency and performs about 12-15% better than Ubuntu on top of much lower CPU and RAM usage on AWS for hosting the same nodejs apps.
评论 #11804906 未加载
lrfrancisalmost 9 years ago
Using for 16 years because I want little hassle from my machines. FreeBSD tends not to blow up everything for new features, yes major technologies have been introduced but rearly at the detriment to others.
imronalmost 9 years ago
I use it. I use a pretty standard stack - nginx, postgres, php and a few other things so I don&#x27;t have the issues some of the other posters have mentioned here about needing to hunt down source and patches and everything is installed via the standard package manager pkg.<p>One thing I really like about it besides the things others have mentioned is that by default it sends emails every day&#x2F;week&#x2F;month regarding security and system usage statistics, so it tells me when a security vulnerability has been found for a package I have installed and that I should upgrade it.<p>I&#x27;ve found this makes me much more likely to keep things up to date.
geff82almost 9 years ago
Yes, because Jails and ZFS are cool. FreeBSD has superb documentation and a giant software repository.
toast0almost 9 years ago
Yes, all the other servers where I work are FreeBSD, why would we run something else for www?<p>It works fine, but Linux is probably ok too. There&#x27;s some things you need to tune if you&#x27;re high traffic -- most of them are sysctls you can tune at run time, but there&#x27;s a couple boot time values; basically if you have enough ram to do webserving at 10gbps, some of the auto tuning for network buffers are going to be oversized, you&#x27;ll likely actually allocate that much during peak, and FreeBSD won&#x27;t return free&#x27;d network buffers to the overall pool; so you can&#x27;t just drop the per socket sysctls, you need to reboot with lower network buffer caps (and per socket buffers, probably too). Depends on what kind of traffic you&#x27;re serving though, and I&#x27;m guessing a lot of people won&#x27;t hit 10Gbps out anyway. There&#x27;s some other minor tweaking of that nature required too; and I would suggest running 10.3-RELEASE, if possible, there&#x27;s some useful bug fixes in there.
cpercivaalmost 9 years ago
Yes. Because it just works.
duncan_baynealmost 9 years ago
No[t yet].<p>Migrating to FreeBSD for both dev and server work is on my personal roadmap for around June &#x2F; July this year, once 11.0 is released and my laptop chipset is supported.
评论 #11804901 未加载
ifihtalmost 9 years ago
Yes, because pf is how a firewall should work.
stock_toasteralmost 9 years ago
Yes, because I rather enjoy using FreeBSD.
mozumderalmost 9 years ago
Yes, because I wanted to reduce response latencies, and wanted something efficient to serve more people with minimal hardware. (I might go unikernel later, once I build a custom HTTP server.)<p>Linux also seemed to have changed quite a bit since the last time I used it in the 90&#x27;s&#x2F;early 2000s. With systemd, it doesn&#x27;t seem like Unix anymore.<p>I also looked up recent Linux distributions to use, and was largely overwhelmed at the choices. I looked up FreeBSD, and it was just one distribution.
rbcalmost 9 years ago
I use FreeBSD for hosting personal web sites. I&#x27;ve used it on and off since version 1.1.5.1. I like BSD in general and have hosted small web sites using NetBSD and OpenBSD. I came back to FreeBSD, mostly because of the broader ports support and binary updates. The packages do most of the work for setting things up. With NetBSD and OpenBSD, there is more integration work to do at setup time. I&#x27;ll add the caveat that this is for small all-in-one web sites.
i_feel_greatalmost 9 years ago
What reliable and reasonably inexpensive hosting services allow you to use FreeBSD?
评论 #11805158 未加载
评论 #11805017 未加载
评论 #11804978 未加载
评论 #11889966 未加载
Scarbuttalmost 9 years ago
No, because the JVM is more supported, tested, used, and developed for linux.
评论 #11805143 未加载
mankash666almost 9 years ago
Yes, because of it&#x27;s superior networking stack
评论 #11804781 未加载
zxvalmost 9 years ago
Yes, because it performs well.
chimpchangealmost 9 years ago
Yes .... and I have for years, both locally hosted on services like Digital ocean.<p>Contrary to what others here have written, FBSD is no more &#x27;fiddly&#x27; than any other server class OS. It is faster, smaller, and better conceived than linux - which is a achieving Microsoft-levels of accretion and cruft.<p>Moreover, FBSD is not constrained by the execrable GPL and its variants, uses a far more modern compiler chain, has better release control, etc.<p>I do use Linux as well - both professionally and for my desktops. Linux is a worthy replacement for the desktop, but Berserkely is an overall more solid server platform.
BillyParadisealmost 9 years ago
Did for years, prior to that I started on BSDi. Flirted with Linux a few times, but ran into dependency hell. Came back a few years later, the package manager finally worked, so I moved most things to Centos.
wandaalmost 9 years ago
Yes, because upgrades can be done without fear and because of ports in general. To say nothing of better TTFB I&#x27;ve observed in my personal experience.
subbsdalmost 9 years ago
I am away from FreeBSD because today is OpenSource is mostly Linux-only development, no interest from software author to get application on FreeBSD, no support. Nothing ;-( If demand technology appear in FreeBSD it occurs many years after Linux. All companies invest money and develop pwoer only in Linux.
davidcollantesalmost 9 years ago
I use FreeBSD as my VPS OS. I use nginx as my web server. FreeBSD because I am used to it (used BSDi a long time ago, and stuck to BSD ever since), and is an excellent OS. Nginx because it is rock solid.
cgagalmost 9 years ago
I&#x27;m doing a coreos + containers thing at the moment.
urbanxsalmost 9 years ago
No, because it is not popular and i want to be popular and use linux.
techdragonalmost 9 years ago
Yes and I&#x27;ve upvoted all the posts with opinions I agree with as well.