| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/19/2012 16:06:19
|
dames
journeyman
Joined: 12/06/2011 20:27:17
Messages: 14
Offline
|
Scenario:
Multi-tenanted SaaS environment. Single JVM per server, multi-tenants in same JVM, all on same code base. Each tenant has their own instance of the ehCacheManager with a different configFilePath.
We specify maxBytesLocalHeap for each cacheManager instance and each Cache uses a %maxBytesLocalHeap
As we are setting this up manually, we can maximize cache sizes for each tenant without over-committing memory.
So far everything is working really well.
New requirement:
Ability to dynamically add more tenants to same server, and shrink size of each existing instance of cacheManager's maxBytesLocalHeap setting whilst JVM and application is still running.
EG, 16 gig heap server. Boot config = 6 tenants @ 1gig cache each, leaving 10gig for application processing. Need to add 6 additional tenants to this server, therefore existing ehCacheManager instances need to be resized down to 0.5gig each. At a later date, we might take the additional 6 clients off, re-sizing the 6 remaining cache managers to 1gig.
Question:
Is this sort of thing possible with ehCache?
Additional Info
We are in an environment where serialization of cached objects isn't a possibility. We are using RMI replication of deletes for multiple application servers which sit behind a load balancer.
Thanks,
dave
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 09/03/2012 04:21:47
|
rajoshi
seraphim
Joined: 07/04/2011 04:36:10
Messages: 1481
Offline
|
No, you cannot dynamically resize the maxBytesLocalHeap for cachemanagers.
|
Rakesh Joshi
Senior Consultant
Terracotta. |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 09/04/2012 03:56:16
|
sghose
journeyman
Joined: 06/26/2012 11:11:30
Messages: 46
Offline
|
Dave, I concur with Rakesh, however you can achieve something similar to what you are looking for with ARC (Automatic resource control). Have a look at this:
http://ehcache.org/documentation/arc
|
Sourabh Ghose - Terracotta Solution Architect |
|
|
 |
|
|