Hi Martin,
Thank you so much for your response.
Our app uses extensive use of RESTful (JSON) service calls from web
and flash clients
and will have multiple requests in parallel for the same session id.
Unfortunately we don't
have a way around this.
Also under high load, we needed to up the sessionBackupTimeout value
( default of 100ms )
which was too low. We're currently testing with a value of between
1000ms and 3000ms.
BTW, when you have the javolution serialization strategy ready
( Option 2), we would certainly
be interested in running our load tests against it to see if it helps.
Thanks again!
Best,
-kenan
Thanks for your reply. Please see my comments below.
> Ok. Do you already handle concurrent session access (e.g. synchronize on the
> session)?
>
> Mostly this is not done simply because most session access is readonly, and
> writing to the session occurs less frequently.
We don't currently synchronize on the session in our code.
> > Also under high load, we needed to up the sessionBackupTimeout value
> > ( default of 100ms )
> > which was too low. We're currently testing with a value of between
> > 1000ms and 3000ms.
>
> I'd also consider switching to async mode (sessionBackupAsync="true") and
> let spymemcached do the rest. The drawback of course is, that you are not
> sure if/when session is stored in memcached (and you don't have the
> guarantee anymore that the latest version of the session is available in
> memcached in the case of a tomcat failure). However, requests don't take
> longer to be processed just because the session was not already sent to
> memcached, and therefore you'll reduce load because you'll have less
> concurrent requests being processed.
Thanks for the tip in case we need it. For our requirements, we'll
probably
stick with sessionBackupAsync="false" just so we do know that the
session
got stored successfully and the latest session is available.
> Can you tell what's the number of requests/second you have during high load
> (where only requests with a session are interesting for memcached session
> backup)? Do you know the number of requests sent to memcached?
We created a test JSP page which would write about 4k of random string
data to the session. A JMeter test was written to hit the page with
20 threads
with each thread maintaining it's own session for the life of the
test.
The requests/second sustained an average of around 10 sessions/second.
Since each request wrote to the session we saw a write to memcached
for every request.
The tests were run on the following hardware:
Platform:
Mac OS X - 10.4.11
Hardware:
Dual Processor 2.66 Ghz Dual-Core Intel Xeon
3GB RAM
JVM:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-
b06-275)
Tomcat:
6.0.20 running JVM options '-Xmx1024m -XX:MaxPermSize=128m -server'
JMeter:
2.3.4 running JVM options '-Xmx256m'
> One thing that might be interesting to you: I want to send sessions to
> memcached only in the case the session data has changed (based on a hash
> over the serialized bytes). To be able to this I also need a change in
> spymemcached, which is the reason why I cannot do this right away. I expect
> this feature to reduce the requests to memcached significantly and that
> remaining requests will be done in shorter time. Unfortunately I cannot say
> when this will be available, but Q1 2010 should be possible.
This sounds like a very useful scalability feature.
Thanks again,
-kenan
> Can you tell what's the number of requests/second you have during high loadWe created a test JSP page which would write about 4k of random string
> (where only requests with a session are interesting for memcached session
> backup)? Do you know the number of requests sent to memcached?
data to the session. A JMeter test was written to hit the page with
20 threads
with each thread maintaining it's own session for the life of the
test.
BTW, when you have the javolution serialization strategy ready
( Option 2), we would certainly
be interested in running our load tests against it to see if it helps.
Thanks again!
Best,
-kenan