3 ms·
Below are just some basic points, I figured I'd try to put some info in the comment rather than linking to a resource. This is by no means comprehensive, just w
by devs1010 15y ago
Below are just some basic points, I figured I'd try to put some info in the comment rather than linking to a resource. This is by no means comprehensive, just what I've learned from working at companies so far that have larger-scale apps
- modularize, use SOA architecture (making modules accessible via a service call so that they can be run on different servers, if necessary), this enables parts of an app that receive heavy use to be clustered separately (as part of an app may be very critical but another module may be able to go down for a few min without causing a major problem, the main reasoning for this is to save on the cost of clustering the entire app)
- avoid holding state in singleton objects, this way no extra code has to be written to synchronize them among different nodes running the same module
- use session locking, so that a user's session is locked to a specific node in a cluster (this enabls ease of saving state for that specific user as they remain on one node throughout their entire session)
- use a database abstraction framework with caching (such as JPA), this enables automated synchronization of the cached data among nodes