Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the performance hit of enabling sessions on Google App Engine?

What is the performance hit of enabling sessions on the Google App Engine?

I just turned on <sessions-enabled>true</sessions-enabled> in my Google App Engine app and now my requests are consistently using 100 more ms of CPU time than before I enabled it. It also makes the user wait an additional 100ms for the server to respond on each request. This seems to be quite a significant cost, I'm not even calling getSession or using it in any way yet and it still adds this extra latency.

Is there something I can do to speed this up?

EDIT: Strangely the extra cpu time is gone now.

like image 430
Kyle Avatar asked Nov 05 '22 15:11

Kyle


1 Answers

Each request using sessions is going to need to fetch the session data from either memcache (in the best case) or the datastore and then at the end of the request write session information to both the cache and the datastore. 100ms of added latency seems like a reasonable figure; obviously the actual latency for any given request will depend on whether there's a cache miss and the (highly fluctuating; see the app engine status page) latency for each API call.

like image 71
Wooble Avatar answered Nov 12 '22 20:11

Wooble