Michael Nygard, author and No Fluff Just Stuff speaker, recently wrote on two alternative approaches to scaling web application performance and scalability: Cache Farms and Read Pools.
The idea behind Cache Farms is that application nodes in a cluster share an external cache instead of each maintaining their own. This eliminates redundancy and gives back heap space to the application server:
By moving the cache out of the app server process, you can access the same cache from multiple instances, reducing duplication. Getting those objects out of the heap, You can make the app server heap smaller, which will also reduce garbage collection pauses. If you make the cache distributed, as well as external, then you can reduce duplication even further.
Read Pools take advantage of the fact that most data driven applications perform many more read operations than writes. By having the reads performed against a dedicated set of read only replicated databases, you can relieve the burden on the write operation databases:
How do you create a read pool? Good news! It uses nothing more than built-in replication features of the database itself. Basically, you just configure the write master to ship its archive logs (or whatever your DB calls them) to the read pool databases.
Michael points out that updating the read hosts may not happen in real time depending on what database you are using, but notes that this might be a perfectly acceptable tradeoff. MySQL users can take advantage of Read/Write Splitting with MySQL-Proxy.
Michael concludes:
The reflexive answer to scaling is, "Scale out at the web and app tiers, scale up in the data tier." I hope this shows that there are other avenues to improving performance and capacity.
Community comments
Coherence cache farms
by Cameron Purdy,
GigaSpaces recommended
by Geva Perry,
Coherence cache farms
by Cameron Purdy,
Your message is awaiting moderation. Thank you for participating in the discussion.
The "cache farm" feature is a popular feature of Oracle Coherence. Benefits include:
* Dynamic scale-out, i.e. easily adding and removing servers without interruption to the application (and without losing any data).
* Configure any level of redundancy, including no redundancy.
* By using dynamic partitioning, Coherence linearly scales out both cache capacity and throughput.
* Read-through and read-coalescing for database access.
* Write-through and write-behind for database updates, including write-coalescing.
* Ability to layer caches, e.g. small on-heap caches layered on top of a large out-of-VM partitioned cache.
Peace,
Cameron Purdy
Oracle Coherence: Clustered Caching for Java and .NET
GigaSpaces recommended
by Geva Perry,
Your message is awaiting moderation. Thank you for participating in the discussion.
Later in his post, Michael Nygard recommends GigaSpaces as a commercial cache farm implementation:
And in another post he writes:
To check out our free offer to start-ups and individuals go here.
Geva Perry
GigaSpaces: The Scale-Out Application Platform