[jboss-user] [JBossCache] - Cache startup problem on highloaded web application

screeny do-not-reply at jboss.com
Tue Apr 3 12:13:21 EDT 2007


Hi !

I'm developing a web application (servlet) for high number of users 20-30 request per second. I implemented Jboss cache (1.4.1sp2) it works fine with small number of users but when I try to loadtest my application I have performance problems at startup.
My main servlet which generates dynamic content try to retrive the requested content from the cache. If it isn't exist generate it from database tables and before send it to the user store it in the cache. 
The problem is that when I try to test my application from 20-30 thread first time every thread try to generate and store the same content in the cache because cache is empty after the start. This generate very high load.
I know there is cache loader but it isn't solve my problem because I need to refresh cache time to time and there will be the same problem.
So, is there any idea? Maybe I should lock the cache until the first thread generate and store the content. How can stop other threads until the first lock the cache?

Thanks for answers

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034182#4034182

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034182



More information about the jboss-user mailing list