Reputation: 4302
I am planning to implement a web application with database. Database servers are of the following structure: 1 Master and several Slave servers. The goal is to make the application scalable, so that if I add and/or remove one more database Slave server - it will keep working without the need in recompilation.
The question is how to make a java EE application independent on the amount of servers? Usually I inject the resourses, however in this case this solution won't work, because the amount of servers is not fixed.
What should I read to understand about it?
Upvotes: 2
Views: 2873
Reputation: 1417
somes articles,
Remember scalability is the father of performance. In fact its goal is to get high performance.
So your scalabity can be define, in several place :
Code : About the Hot Lock for example you should reduce the number of synchronized blocks,Reducing lock granularity,Avoid lock on static methods
Replication issues: You seem to be aware about it cool, i just suggest one thing p2p system is better than master-slave also called Primary-Based Replication in this case. Cause you have to ensure the life of the master, master down, you will have to elect new master(bully ?), synchronized database.... !!
Here some must-know articles about scalability :
Hope it's helped.
Upvotes: 6