Setting up FreeNAS - Software Architecture Questions

Status
Not open for further replies.

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
Hi there,
I am currently looking in to moving from Openmediavault to FreeNAS and am trying to find out what would be the best setup. I would set up the following applications in separate jails to achieve modularity and to be able to experiment easily inside some of the jails without jeopardizing the entire setup:

- FHEM (home automation Server)
- Mailserver (fetching mails from different external servers via getmail and presenting them via roundcube)
- OpenVPN (Provide external access to the server and the home network)

and then a couple of web applications, for example

- Owncloud
- Photoshow (PHP Web Galler)
- Wallabag (PHP read later application)

The web applications all require a MySQL Database, PHP and a webserver.

What is best practice here? Do I install everything in each jail (redundancy) or does it make sense to have a dedicated MySQL jail that each application jail connects to? Would redundant MySQL servers introduce a lot of additional overhead or can that be neglected? What about redundant webservers?

From reading HowTos and other threads, it seams like most people simply put it all in the same jail (like in most owncloud examples). Is this done for a reason or is it just the easiest way?

I'd really appreciate some hints on this topic!
Thanks
Leo
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Lots of people probably put things all in one jail because that tends to be easy to understand for users who don't have extensive experience with setting up lots of different services in compartmentalized environments.
 

rsquared

Explorer
Joined
Nov 17, 2015
Messages
81
My rule of thumb is to think of each jail as its own machine. In other words, if I were deploying the applications in a data center, would I want them on their own hardware (or virtual machine as the case may be)? For most things like MySQL it makes more sense to have a dedicated jail serving multiple clients, but others might make sense to run together.

In my case I feel like my media management applications fall under the latter case, so I've got Sonarr, NzbGet and Deluge all running in a single jail, but MySQL and my backup software each get their own.
 

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
I also figure that on the one side it would be "clean" and correct to only have one MySQL jail that serves to all that need db access.

On the other hand it probably really is easier to grasp if separate applications also have their own MySQL instance. This way it is also easier to restore a previous snapshot if some upgrade goes wrong. If the malicious update altered the db, that would have to be separately restored.

So I guess actually my question breaks down to: Is there really a practical downside (i.e. noticable difference in performance) of having a separate MySQL instance in each jail that requires one? Or is this just not "good form" and a theoretical issue?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Keep in mind that each instance of MySQL (or Apache, or Nginx, or whatever) will consume some resources, in the form of disk space, CPU cycles, and RAM.
 
Status
Not open for further replies.
Top