
dridi.boukelmoune at zenika
Jul 3, 2013, 4:50 AM
Post #1 of 1
(76 views)
Permalink
|
|
Passing cookies to ESI includes
|
|
Hi all, I hope someone can help me with this ESI problem I have with one of my clients. One of the applications here use Varnish in front of two backends, and we see a lot of session garbage allocated because of ESI not passing cookies back-and-forth. The two backends in a nutshell: - front office (drupal cms) - back office (java webapp, connected to other services of the company) For the sake of simplicity, assume the front and back offices send respectively PHPSESSID and JSESSIONID cookies. The setup is also twisted, since you can actually access to both front and back offices (varnish does the routing) and each can esi:include fragments from the other. I haven't got through the 5 whys with the team yet... The worst case scenario: - Access to the front office without any cookie => drupal adds a set-cookie header for PHPSESSID => varnish finds N esi:include tags (one per request) It means N wasted sessions on the back office since none of the cookies will be retrieved by the user agent. And this will happen until you actually hit a page directly on the back office (with a shiny JSESSIONID). The ideal solution: - Access to the front office without any cookie => drupal adds a set-cookie header for PHPSESSID => varnish finds N esi:include tags => champagne \o/ I'm open to any kind of solution, including (no pun intended) inline C or open source vmods. Any help appreciated :) One more thing: I'm aware of libvmod-header, which solves the (implicit) multiple Set-Cookie headers issue, but doesn't help cross the ESI boundaries. Best Regards, Dridi _______________________________________________ varnish-misc mailing list varnish-misc [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
|