How can I distribute a unique database already in production?
- by JVerstry
Let's assume a successful web Spring application running on a MySQL or PostgreSQL database. The traffic is becoming so high and the amount of data is becoming so big that a distributed database solution needs to be implemented to address scalability issue. Let's also assume this application is using Hibernate and the data access layer is cleanly separated with DAOs.
Ideally, one should be able to add or remove databases easily. A failback solution is welcome too.
What would be the best strategy to scale this database? Is it possible to minimize sharding code (Shard) in the application?