34
Drupal et gros trafic Par Maxime TOPOLOV (ADYAX) Twitter.com/mtopolov SkypeID : mtopolov

Comment gérer un site à très haut trafic avec Drupal

  • Upload
    adyax

  • View
    3.184

  • Download
    0

Embed Size (px)

DESCRIPTION

Présentation faite lors d'une session à DrupalCamp Nantes en 2011. Par Maxime TOPOLOV de Adyax (http://www.adyax.com)@mtopolov@adyax_corp

Citation preview

Page 1: Comment gérer un site à très haut trafic avec Drupal

Drupal et gros trafic

Par Maxime TOPOLOV (ADYAX)Twitter.com/mtopolovSkypeID : mtopolov

Page 2: Comment gérer un site à très haut trafic avec Drupal
Page 3: Comment gérer un site à très haut trafic avec Drupal

C’est les 60 sites Drupal en 2010…

Un CMS pour iPad

55 experts Drupal, 3M€ de CA

Page 4: Comment gérer un site à très haut trafic avec Drupal

Trafic anonyme : même contenu pour tous les visiteurs.

Page 5: Comment gérer un site à très haut trafic avec Drupal

Plus simple à gérer que le trafic connecté

Page 6: Comment gérer un site à très haut trafic avec Drupal

Plus simple à gérer que le trafic connecté… juste avec Drupal …

Page 7: Comment gérer un site à très haut trafic avec Drupal

Remplacer Drupal par Pressflow,Activer le cache

Page 8: Comment gérer un site à très haut trafic avec Drupal

Installer et configurer Boosthttp://drupal.org/project/boost

Page 9: Comment gérer un site à très haut trafic avec Drupal

Boost génère des fichiers HTML statiques, mais execute le boostrap Drupal…

Page 10: Comment gérer un site à très haut trafic avec Drupal

Installer et configurer Elysia Cronhttp://drupal.org/project/elysia_cron

Page 11: Comment gérer un site à très haut trafic avec Drupal

Elysia Cron permet de gérer toutes les taches attachées à hook_cron, paralleliser et désactiver certaines d’entre-elles…

Page 12: Comment gérer un site à très haut trafic avec Drupal

Installer sur les fronts 6 instances memcached, configurer CacheRouter sur Drupal (http://drupal.org/project/cacherouter)

Page 13: Comment gérer un site à très haut trafic avec Drupal

Configuration memcached conseillée : default : cache, cache_views, cache_update -> 256 Momenu : cache_menu -> 64 Mocontent : cache_views_data, cache_content, cache_page -> 128 Moblock : cache_block -> 64 Mofilter : cache_filter -> 64 Moform : cache_form -> 64 Mo

Page 14: Comment gérer un site à très haut trafic avec Drupal

Mettre en place Varnish ! (http://drupal.org/project/varnish)

Page 15: Comment gérer un site à très haut trafic avec Drupal

Installer Apache SOLR sur un serveur à part !

Page 16: Comment gérer un site à très haut trafic avec Drupal

Exemple : IPSOS.FR Ngnix + Varnish + SOLR

Page 17: Comment gérer un site à très haut trafic avec Drupal
Page 18: Comment gérer un site à très haut trafic avec Drupal

http://gotdrupal.com/videos/drupal-performance-boosthttps://wiki.fourkitchens.com/display/PF/Configure+Varnish+for+Pressflowhttp://pressflow.orghttp://2bits.com/drupal-performance/improving-performance-drupals-cron-using-elysia-cron-module.htmlhttp://groups.drupal.org/node/21897/revisions/114963/viewhttp://coldfrontlabs.ca/blog/making-drupal-fly-apc-memcache-and-squidhttp://www.slideshare.net/akucharski/make-drupal-run-fast-increase-page-load-speed

Page 19: Comment gérer un site à très haut trafic avec Drupal

À retenir : RAM, Varnish, Memcached, Ngnix, Apache SOLR

Page 20: Comment gérer un site à très haut trafic avec Drupal

Trafic connecté = une partie des pages est unique pour chaque visiteur...

Page 21: Comment gérer un site à très haut trafic avec Drupal

Exemple : panier d’une boutique. Facile, on l’enleve du VCL de Varnish ou de la configuration de boost, mais…

Page 22: Comment gérer un site à très haut trafic avec Drupal

… le bloc panier s’affiche sur toutes les pages = impossible de cacher l’intégralité de la page.

Page 23: Comment gérer un site à très haut trafic avec Drupal

… le bloc panier s’affiche sur toutes les pages = impossible de cacher l’intégralité de la page.

Page 24: Comment gérer un site à très haut trafic avec Drupal

Solution : AuthCache ou Varnish ESI

Page 25: Comment gérer un site à très haut trafic avec Drupal
Page 26: Comment gérer un site à très haut trafic avec Drupal

Pour vous simplifier la vie avec AuthCache, utilisez notre module : Easy Authcache http://drupal.org/project/easy_authcache

Page 27: Comment gérer un site à très haut trafic avec Drupal
Page 28: Comment gérer un site à très haut trafic avec Drupal

Adyax va reverser une intégration Varnish ESI pour Panels d’ici peu ! Surveillez @adyax_corp

Page 29: Comment gérer un site à très haut trafic avec Drupal

Le probleme principal de très gros trafics : MySQL + Drupal BootStrap

Page 30: Comment gérer un site à très haut trafic avec Drupal
Page 31: Comment gérer un site à très haut trafic avec Drupal

FreeRice.com = 20.000.000 pages vues / jour -> Varnish -> MongoDB + Pas de Drupal (pur PHP)

Page 32: Comment gérer un site à très haut trafic avec Drupal
Page 33: Comment gérer un site à très haut trafic avec Drupal

En tous cas, activez vos caches TRES TOT ! Ne le FAITES PAS au dernier moment !

Page 34: Comment gérer un site à très haut trafic avec Drupal

… JAMAIS AU DERNIER MOMENT (signé - France.fr)