There are two reasons why I'm not using a database (a database was my initial thought as well). Firstly, reliabilty is crucial. The system does write data to a database, but should that database be down, it has other (multiple) mechanisms so that no data is lost. I could possibly do something similar on the config side (ie. have a failover config file, but normally read out of the database), and that might not be a bad option, but I'm wondering if there are any others.
The other reason is mainly political - the current application doesn't use a database for it's config (although it's woefully inefficient), but it's realiable (ie. there's no DB server to go down). Reliability is above efficiency in this project..
The ideal would be to have some sort of High Availability Db server in place, but that infrastructure doesn't currently exist. Hopefully, I can do this in the future, but currently my hands are tied.
| [reply] |
In my experience, databases (well, good databases, not toy things like MySQL) are far more reliable than file systems. Sure, your database could not be available, but so could your filesystem. And your database will not corrupt your configuration data if your application dies halfway writing the configuration file. Rest assured that anything based on doing simple write(2)s will happily leave your data in a corrupt state if the application dies halfway. Or worse, if the application dies after thinking it finished writing the data (but alas, some of it was still in a buffer somewhere).
Using your filesystem instead of a database for reliability is like "going to war for peace" or "fucking for virginity". Larry Ellison wouldn't be as rich as he is now if filesystems were as reliable as databases.
The ideal would be to have some sort of High Availability Db server in place, but that infrastructure doesn't currently exist.
Tell, you do at least have a HA filesystem? And your application itself is running in a cluster? Otherwise, all you will be doing is window dressing.
| [reply] |
Actually, writing is not an issue, since the config is actually stored in a DB (albeit MySQL) until it's ready to be 'published'. And yes, the application itself runs on 7 servers. (Don't ask me why the DB only runs on one...).
All things being equal, I would use a DB and wouldn't even bother posting this here, but I've inherited an infrastructure that's not ideal (as is not likely to be changed much anytime soon), and also expectations on reliablilty inherited from the legacy application. I take your points though.
| [reply] |