I've used Infinispan in one of my previous project and till now am very happy with the preformance. Now, i want to try it out on a very high
traffic system. I've done a basic stress test and I've some questions. I want to use Hotrod server for caching and following are the requirements and doubts:
1. cache objects will be small -> 500 - 1000 bytes
2. there will be millions of objects -> If i use FileCacheStore then this will mean there will be millions of files in a directory, won't this make cache slow? (I think there's a log(N) access cost for accessing a file in a folder with N entries, please correct me if am wrong)
3. I want a non-transactional cache -> Will hotrod client still use a lock in order to assure operation atomicity?
4. Does Hotrod server have the concept of L1 and L2 caches?
Following is my configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan>
<namedCache name="TestCache">
<loaders shared="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="true">
<properties>
<property name="location" value="/home/rana/infinispan_cache/"/>
</properties>
<!-- write-behind configuration starts here -->
<async enabled="true" threadPoolSize="10"/>
<!-- write-behind configuration ends here -->
</loader>
</loaders>
</namedCache>
</infinispan>
The client-side code to access the cache is:
CacheContainer cacheManager = new RemoteCacheManager("localhost", 11222);
cacheManager.start();
Cache<String, UserObj> cache = cacheManager.getCache("TestCache");
Will this create a non-transactional cache? Anything that am missing in configuration or code that can help improve the performance?
Best Regards,
Rana