I'm currently developing a distributed system in Java and I want to know about Java persistence and clusters, any guidance.
posted 11 months ago
First, you need to set up database replication to accommodate more traffic coming from the application cluster nodes.
Spring offers a very nice AbstractRoutingDataSource which you can use to split traffic towards master and slave nodes.
If you are using 2nd level caching, it's better to use it in a cluster environment too, as otherwise every node will have a full copy of the whole cache.
What I also advise you to do is to investigate FlexyPool because in a clustering environment you need to connection pooling monitoring to know the right size of every connection pool you use in your system.
That's especially relevant if you use auto-scaling for front-ends and batch processors too.