Thursday 2: BoF by Fabian Franz, "Performance and Scalability"

Non-anonymous traffic: Block cache; Everything must hit memcache. Edge side includes a possible solution? [could you use AJAX page build to get immediate feedback a la Amazon?] You can also do user-based Varnish cacheing - cache the ESI based on uid [- could that lead to security issues? can anon get that page somehow?]

 

Pillars of good performance:

APC - enough memory [use apc.php to diagnose it - included with the Ubuntu package]

Memcache (interesting MySQL developments, but not yet ready - could end up quicker?)

Percona - high performance MySQL distribution fork. Allow use of MySQL as a key value store faster than Mongo and Memcache. Not yet for Drupal.

D6 - put in high-performance locking to prevent cache stampedes

Varnish but not with logged-in users. Boost is not always enough.

 

Contrib modules breaking Varnish and some hacked core cannot be switched to Pressflow

Combine Boost and Varnish to let logged-in users see Boost pages without Apache being hit: http://www.trellon.com/content/blog/boosted-varnish-high-performance-cac...

Pressflow / Drupal 7 setting of cache expiry time - passes through to Varnish which can change it. Boost can have 12 hour expiry, Varnish check the etag every hour. Purge rules on 701826 comment 7. Also Varnish grace

 

Put dynamic requests through POST?

"Set req.hash +=" lets you specify different hash for e.g. user ID

varnish-cache.org/trac/wiki/VCLExampleCachingLoggedInUsers

 

Question: CSS-less pages? If Varnish cache is two weeks, you never have CSS expiry. Varnish wants to cache CSS if some pages still refer to it. Use Advanced Aggregation JS CSS - same author as Boost

 

Persistent URL (PURL) can give geo-based cache bins

InnoDB row locking not table locking [but in our experience, you can still get resource problems on big databases as INSERT buffer of InnoDB engine grinds to a halt]. InnoDB backup is a separate program which prevents site being stalled by READ locks

 

Views optimized - separates filtering from return results. Can improve bad queries drupal.org//sandbox/Fabianx/1184598 Usage: groups.drupal.org/node/154564#comment-516139

 

Facebook etc. Widgets - Asynchronous loading mode. Script tag async attribute [supported? more info at http://stackoverflow.com/questions/1834077/which-browsers-support-script... ]