Symfony2 and Varnish and sessions

New topics about Symfony 2 should go here

Moderators: dcobalt, tiagojsag

Symfony2 and Varnish and sessions

Postby firstclass » Fri Jun 15, 2012 10:44 pm

Hello Fellow Symfony2 users,

I am developing a high traffic site and we are getting to the point that we should use a varnish caching server.
I've already been experimenting with a setup, but the point that gets my head spinning is sessions.

Users can login on our website, and post reply's and photo's. I already have symfony2 running with the AppCache function of it, with ESI enabled.
This works quit well, but the overhead that apache takes, is still too much. With about 75-100 request per second the server is at its limit.

Anyway... What happens now is that the session is always started when a user visits our website.
Symfony/PHP recognizes it, so it doesn't restart the session, and still using the public cache, for the non-ESI elements on the page. Works perfectly.

Well this is where is gets tricky for varnish.
What I would like is the exact same behaviour.. but that is not possible, because php work be called to start a session.
But removing it from the request will cause my ESI to get non-functional. i.e. the session will keep getting restarted or other misbehaviour.

I was wondering how other sites manage to get this working with sessions and all.
What is the correct approach for this problem?

Regards,

Winus

ps; the site is http://www.autogespot.com
firstclass
Junior Member
 
Posts: 4
Joined: Thu May 03, 2012 11:06 am

Re: Symfony2 and Varnish and sessions

Postby filth » Thu Jul 05, 2012 5:07 pm

Hi,

running into same Problems. Did you find an solution for that?

Thanks!
filth
Member
 
Posts: 31
Joined: Thu Jul 28, 2011 2:34 pm


Return to General Symfony 2 discussion

Who is online

Users browsing this forum: No registered users and 4 guests