replicated HSQLDB
We're reviewing different DB engines to be used in our spring java project (actually grails project). Neither of real DB
MySQL/PostgreSQL
support clustering out of the box (it's still possbile to cluster DB instances using 3rd party software).
I'm thinking of using HSQLDB
locally on each server and replicate them using HSQLDB-R
(via JGroups
). The size of every database开发者_如何学C won't exceed few hudnreds of megabytes.
Could someone tell me what hidden problems I should expect?
For clustering with HSQLDB, use http://ha-jdbc.sourceforge.net/
HSQLDB/R was a proof-of-concept project, based on JGroups communications. HA-JDBC is a production system that uses JGroups and supports HSQLDB.
Medium sized databases (less than 1GB) are commonly deployed in production using HSQLDB.
H2 has clustering support built in - see http://www.h2database.com/html/advanced.html#clustering. I haven't used it extensively so I can't comment on issues, but it worked fine in my tests. Plus H2 is a significantly better implementation overall vs HSQLDB.
What are you trying to accomplish with the database cluster? If redundancy is your primary objective, then you could have multiple MySQL instances using replication in a master-slave setup. If the master fails, then you can automatically promote the slave to be the master. If your application is read-intensive you'll also be able to see a performance increase as the slaves can serve up database reads. There is quite a lot of good information about this here.
精彩评论