1

I'm about to set up a web-server which runs NGINX and MySQL.

In FreeBSD I can totally separate the Webserver and the Database Server and run them in separate jails. In Debian I could run them in KVMs or XEN instances but it seems like a lot of overhead. I also heard than NGINX performs better on FreeBSD but I don't have any proof. How about security for both operating systems?

What's your opinion? What experiences did you make? Looking forward to your answers!

(sidenote: NGINX will run a Ruby on Rails application)

  • I Just found a first interesting comparison of jails vs vmware virtualization http://www.playingwithwire.com/2009/06/virtual-failure-yippiemove-switches-from-vmware-to-freebsd-jails/ –  Sep 11 '10 at 09:52

2 Answers2

1

The overhead of KVM/Xen towards FreeBSD Jails is big enough to prevent it.

I am running several FreeBSD servers with nginx and can't recommend anything better than this combination. FreeBSD has great security features and is extremely stable.

nginx is very fast, you can tweak a lot and tune it to the max.

Sure, Debian is a very nice system and also quite fast, but if you put Security, Speed, Reliability and Ease of Use in one pot, you get FreeBSD.

I would choose the FreeBSD setup. Rails or not is not relevant here as Ruby performs fine on both systems.

Hope this helps :)

Regards, Ben.

UPDATE: What I forgot: If you use a Jails-Framework like ezJail you get things up and running within minutes. No Kernel-Tweaking etc. Just run it and become happy. A new Jail is only a few MB this way.

If you don't know the FreeBSD manual, you should check it out. It's incredibly complete and very interesting to read.

Link: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/

Another difference might be interesting for you is that FreeBSD ports most of the time are more up to date. And as you compile the software on your own machine you can improve the performance even a little more by setting appropriate compiler flags.

But to be fair, if you prefer / know Debian better, you can not really make a mistake by choosing it.

  • +1, Agreed. The only major difference, Jails incur a minimal performance hit; full hypervisor virtualization incurs more performance penalty. – Chris S Oct 26 '10 at 12:37
0

KVM/Xen seems overkill and indeed too much overhead to just separate Database and webserver. On Debian you could use OpenVZ to do roughly the same thing as with Jails on BSD (container-based virtualization).

I have no first hand experience with the stability of FreeBSD, but I can assure you that Debian is pretty stable as a very serious production web and database server. Debian is incredibly well documented and runs on a lot of hardware without problems.

Jasper
  • 1,084
  • 10
  • 10