| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/23/2012 12:03:12
|
cochs
neo
Joined: 07/23/2012 11:45:44
Messages: 1
Offline
|
I wanted to evaluate Terracotta as a customized in memory caching layer for where I work. We use a popular nosql data store, and our applications are write heavy (50/50 read/write). We would need to support around 10,000 requests per second, an even mix of reads and writes. Concurrent writes to the same key would be rare, and we would know in advance which key spaces would need to support concurrent writes. Concurrent reads would be more common, but again they would be within specific key spaces. The normal case is only one client is reading/writing the same key.
The general idea I had was a caching layer that only saves to our data store periodically. It would probably be time + number of writes, with both parameters being configurable. If multiple writes came in between updates, the cache layer would merge them into a single write to the data store. I'm thinking the time based requirement could get tricky to implement efficiently.
What I don't know is which products I should be using here. If someone could point me in the right direction I would appreciate it.
Chris
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/23/2012 18:29:05
|
klalithr
consul
Joined: 01/23/2011 10:58:07
Messages: 466
Offline
|
I think Terracotta would be an excellent fit here. In terms of scaling, I dont see any major red flags. 10K request/sec should be okay depending on the size of the objects - You havnt mentioned the size or kind of the objects (I am assuming (perhaps incorrectly) it would be around a few KB.
Obviously you would want to size your ehcache based on your read/write access patterns and user experience. As simultaneous updates to the same key are rare, you do not need any explicit locks - implicit locks with eventual consistency would be perfect - again I am speculating here based on my knowledge of your usecase.
In terms of coalescing the writes into one update, you could either do that using a simple decorator or use the write behind with coalescing turned on. I agree that the implementation needs to be fairly robust in terms of regressing the various flavors but Ehcache and Terracotta gives you the ability to get creative with some of these scenarios.
Good luck with your implementation.
|
Karthik Lalithraj (Terracotta) |
|
|
 |
|
|