-
1. Re: Cache startup problem on highloaded web application
genman Apr 3, 2007 1:00 PM (in response to screeny)
If you're using a web application, I assume you're on two nodes. If you're using a cluster with replication, the replication should copy at startup and the new node shouldn't have load issues. -
2. Re: Cache startup problem on highloaded web application
screeny Apr 3, 2007 1:35 PM (in response to screeny)I'm on one node (one server, one jvm without clustering)
My application flow is this:
1. request to my servlet
2. if content is in cache put it in response and send it to the client (end)
3. if not cached generate content
4. store generated content in cache
5. put content in response and send it to the client (end)
The problem is that with 20-30 request/sec (all request starts at same time or within 1 sec like a production system) every request skip 2. because the first time the cache is empty and goes to step 3. to generate content. Because step 3. is a relalatively slow process because of sql commands the 20-30 thread generate high load and can't serve requests.
If I start one thread first and wait for the first response the next threads can use cached data and everything works fine, but it isn't a real case.