Improving eZ publish performance with Varnish

Author Message

Webmaster Mission Timothée

Monday 09 July 2007 1:08:39 am

Hello,

When I read "Linpro has a close relationship with eZ Systems", I hope that I will find some help to optimize my web site.

I want to cache all the unlogged pages but pipe when user is logged in

my filtering's config's file is vcl.conf (written in Varnish Config Langage)

a diff on the IP paquet for index.php (logged in) and index.php (not logged in) send no difference in the html headers.

Can you help me ? (my english is very bad, so sorry)

André R.

Monday 09 July 2007 4:45:26 am

eZ Publish currently always sends out session to a user even if he isn't logged in (because he can still have access to posting comments and so on).

This and other things are being looked at for better support for varnish and similar solutions.
But in the mean time you'll have to force cache of certain parts of your web page that are for anonymous users.

The normal way to solve this is to have several siteaccesses, one thats being cached, one for logged in users, and one for admin interface.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Xavier Dutoit

Monday 09 July 2007 6:32:32 am

Hi,

If you're willing to put your hands and modify the kernel, one option is to modify the login to add a cookie "loggedin".

You can then test this cookie to decide if it's anonymous or logged in user.

(idea stolen from someone else, can't remember where I saw/read it)

X+

http://www.sydesy.com

Paul Borgermans

Monday 09 July 2007 8:36:23 am

That was from Kristof ;-) (to have one siteaccess, static cache for anonymous, normal view caches for front-end editing)

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Kristof Coomans

Monday 09 July 2007 10:43:30 am

The idea wasn't mine, I only wrote some code for it. See http://ez.no/community/forum/developer/static_cache_get_user_login_information_by_cookie_js

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Norman Leutner

Wednesday 29 August 2007 6:44:46 am

Has anybody managed to get Varnish working together with ez?

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:38:53
Script start
Timing: Jan 18 2025 19:38:53
Module start 'layout'
Timing: Jan 18 2025 19:38:53
Module start 'content'
Timing: Jan 18 2025 19:38:53
Module end 'content'
Timing: Jan 18 2025 19:38:53
Script end

Main resources:

Total runtime0.6579 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 589.1641152.6406
Module start 'layout' 0.00440.0024 741.804739.4766
Module start 'content' 0.00690.6498 781.2813740.6875
Module end 'content' 0.65670.0013 1,521.968816.1250
Script end 0.6579  1,538.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.4447160.0002
Check MTime0.00120.1838160.0001
Mysql Total
Database connection0.00080.119010.0008
Mysqli_queries0.591789.9334740.0080
Looping result0.00080.1289720.0000
Template Total0.627595.420.3137
Template load0.00210.312520.0010
Template processing0.625495.059120.3127
Template load and register function0.00030.042410.0003
states
state_id_array0.00160.235910.0016
state_identifier_array0.00070.111020.0004
Override
Cache load0.00180.2788320.0001
Sytem overhead
Fetch class attribute can translate value0.00050.076060.0001
Fetch class attribute name0.00110.1738110.0001
XML
Image XML parsing0.00310.469660.0005
class_abstraction
Instantiating content class attribute0.00000.0035110.0000
General
dbfile0.00140.2055430.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs