SCALING DRUPAL WITH CONFIDENCE TWEENTRIBUNE CASE STUDY By:-Priyanka Jhamnani  Ebizon Net Info M: 5126294253 :  www.ebizontek.com E: priyanka.jhamnani@ebizontek.com
About TweenTribune.com Tween Tribune is the world’s first Online Newspaper for Kids between the ages of 8 and 14 encouraging Kids to seek out News on a daily basis.  Stories chosen for Tweentribune are selected by teachers working closely with professional journalists.  Tweens can submit links to stories they'd like to share, submit their own stories and photos, and comment on the stories they read.
Tween Tribune Statistics Tweentribune is a success story that has been featured in  LAtimes ,  YPulse.com ,  KillerStartups ,  WeMedia ,  GoodHouseKeeping  and getting more than 3 million page views a month. The page views have increased drastically from 40,000 in August to 3 million in March. Around 1000 comments are posted per day by school kids as a part of their homework with around 23000 page views per hour.
TweenTribune Hardware One with apache webserver and memcache has following configuration:  Quad Socket Quad Core Intel Xeon E7440 2.4GHz 128 GB Memory  Operating System: Red Hat Enterprise Linux 5 - 64 bit Database server has following configuration: RAID 5 12 GB DELL RAM Single Socket Quad Core Intel Xeon L5520 2.26GHz
About Ebizon NetInfo  Ebizon is one stop solution for 3 D’s  Design Drupal Development Our clientele includes Tweentribune, Intel, DSM Nutritional Foods, Tata Nano, Benzinga and many more.
About Ebizon NetInfo  Drupal Module Contributions http://drupal.org/project/content_slider http://drupal.org/project/admin_notify http://drupal.org/project/localemail http://drupal.org/project/jquery_drag_drop http://drupal.org/project/userloginbar http://drupal.org/project/soapclient    (Drupal 5 port) Drupal Theme Contributions http://drupal.org/project/ebizon_exotic_red http://drupal.org/project/ebizon_redfire
What we mean by scaling? It’s about Capacity and not  How Fast  Bottlenecks/Steps to Maximize Capacity: Drupal/Custom Code Mysql Server/Apache Caching
Code/Module Optimization This is constant effort:  What is optimum today, becomes bottleneck tomorrow Here optimization is done at 2 levels Code performance Query optimization
Code/Module Optimization Example:-  Taxonomy Menu module used to  load all States, cities, schools & classroom Ajax Menu implementation reduces  page load Menu restructuring set only once during  the day
Code/Module Optimization Access logs and statistics disabled It keeps track on every node view and therefore  gets heavy on server Views simplified
Mysql Configurations Separation between Mysql and Apache MyISAM to InnoDB Number of Mysql Connections Optimum Mysql Timeout Views simplification
Apache Configuration   Using Lighttpd lightweight webserver as a static file server Serves static files from a different web server than one that executes PHP Static files include js/css/images Static file server &dynamic web server shared a document root with routing request set in the code.
Apache Configuration   Enabled mod_deflate for Apache 2 for compression of html content. Moved Drupal’s .htaccess to Apache’s httpd.conf. Minimum number of Apache modules that are required to run Drupal.
Apache Configurations-2 Turn Off Keep-Alive in main web server’s configuration so that connection is non persistent  Maximum expiry to 2 years.
Squid/Caching Reverse Proxy Squid acts as a front end to web server receiving requests from it and serving them to users while keeping copies on its own cache for future request.
Squid/Caching Reverse Proxy Squid Eases the burden on a web server that provides both static and dynamic content. The static content can be cached on the reverse proxy while the web server will be freed up to better handle the dynamic content.  Squid caches css/js/image files.
Caching Built-in caching: Enabled CSS Aggregation: Enabled JS Aggregation:  Enabled Block Cache: Enabled. Static blocks were cached. Boost: Turned off. Had problems at lot of steps. Memcache using Cacherouter
Memcache All cache tables except for cache_form stored in Memcache 6 instances running on each port for each cache table: cache, cache_content, cache_page, cache_views. Sessions stored in memcache Cache_form cached using filecache Cacherouter module used Memcache module to store session
Memcache-2 Following “difficult” tried-and-testing configuration on settings.php:  $conf = array(   'cache_inc' => './sites/all/modules/cacherouter/cacherouter.inc', 'session_inc' => './sites/all/modules/memcache/memcache-session.inc',   'memcache_servers' => array(     'localhost:11212' => 'cluster2',   ),   'memcache_bins' => array(     'session' => 'cluster2'   ),
Memcache-2 'cacherouter' => array( 'cache_page' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11211'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11213'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_menu' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11214'), 'shared'=>FALSE, 'prefix'=>'', ),
'cache_filter' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11215'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_block' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11216'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_content' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11217'), 'shared'=>FALSE, 'prefix'=>'', ), 'default' => array(     'engine' => 'file',    'servers' => array(),     'shared' => TRUE,     'prefix' => '',     'path' => 'sites/default/files/filecache',     'static' => FALSE,     'fast_cache' => TRUE,   ), ), );
Special Thanks to  Mr. Alan Jacobson Founder of Tweentribune for his ongoing support, patience and confidence in us!
References http://www.lullabot.com/articles/using-lighttpd-static-file-server http://2bits.com/articles/increasing-drupals-speed-squid-caching-reverse-proxy.html http://ebizontek.com/blogs
Contact Us US office  1 Autumn Ct. East Windsor, CT  06088 USA M:- (203) 550 4089 (510) 629 4253 India office E-160, Sector 63 Noida – 201301 India P:- +91120  4209635 W:  http://www.ebizontek.com/ E :  [email_address]
Thanks!

Scaling drupal with confidence - Tweentribune Casestudy

  • 1.
    SCALING DRUPAL WITHCONFIDENCE TWEENTRIBUNE CASE STUDY By:-Priyanka Jhamnani Ebizon Net Info M: 5126294253 : www.ebizontek.com E: priyanka.jhamnani@ebizontek.com
  • 2.
    About TweenTribune.com TweenTribune is the world’s first Online Newspaper for Kids between the ages of 8 and 14 encouraging Kids to seek out News on a daily basis. Stories chosen for Tweentribune are selected by teachers working closely with professional journalists. Tweens can submit links to stories they'd like to share, submit their own stories and photos, and comment on the stories they read.
  • 3.
    Tween Tribune StatisticsTweentribune is a success story that has been featured in LAtimes , YPulse.com , KillerStartups , WeMedia , GoodHouseKeeping and getting more than 3 million page views a month. The page views have increased drastically from 40,000 in August to 3 million in March. Around 1000 comments are posted per day by school kids as a part of their homework with around 23000 page views per hour.
  • 4.
    TweenTribune Hardware Onewith apache webserver and memcache has following configuration: Quad Socket Quad Core Intel Xeon E7440 2.4GHz 128 GB Memory Operating System: Red Hat Enterprise Linux 5 - 64 bit Database server has following configuration: RAID 5 12 GB DELL RAM Single Socket Quad Core Intel Xeon L5520 2.26GHz
  • 5.
    About Ebizon NetInfo Ebizon is one stop solution for 3 D’s Design Drupal Development Our clientele includes Tweentribune, Intel, DSM Nutritional Foods, Tata Nano, Benzinga and many more.
  • 6.
    About Ebizon NetInfo Drupal Module Contributions http://drupal.org/project/content_slider http://drupal.org/project/admin_notify http://drupal.org/project/localemail http://drupal.org/project/jquery_drag_drop http://drupal.org/project/userloginbar http://drupal.org/project/soapclient   (Drupal 5 port) Drupal Theme Contributions http://drupal.org/project/ebizon_exotic_red http://drupal.org/project/ebizon_redfire
  • 7.
    What we meanby scaling? It’s about Capacity and not How Fast Bottlenecks/Steps to Maximize Capacity: Drupal/Custom Code Mysql Server/Apache Caching
  • 8.
    Code/Module Optimization Thisis constant effort: What is optimum today, becomes bottleneck tomorrow Here optimization is done at 2 levels Code performance Query optimization
  • 9.
    Code/Module Optimization Example:- Taxonomy Menu module used to load all States, cities, schools & classroom Ajax Menu implementation reduces page load Menu restructuring set only once during the day
  • 10.
    Code/Module Optimization Accesslogs and statistics disabled It keeps track on every node view and therefore gets heavy on server Views simplified
  • 11.
    Mysql Configurations Separationbetween Mysql and Apache MyISAM to InnoDB Number of Mysql Connections Optimum Mysql Timeout Views simplification
  • 12.
    Apache Configuration Using Lighttpd lightweight webserver as a static file server Serves static files from a different web server than one that executes PHP Static files include js/css/images Static file server &dynamic web server shared a document root with routing request set in the code.
  • 13.
    Apache Configuration Enabled mod_deflate for Apache 2 for compression of html content. Moved Drupal’s .htaccess to Apache’s httpd.conf. Minimum number of Apache modules that are required to run Drupal.
  • 14.
    Apache Configurations-2 TurnOff Keep-Alive in main web server’s configuration so that connection is non persistent Maximum expiry to 2 years.
  • 15.
    Squid/Caching Reverse ProxySquid acts as a front end to web server receiving requests from it and serving them to users while keeping copies on its own cache for future request.
  • 16.
    Squid/Caching Reverse ProxySquid Eases the burden on a web server that provides both static and dynamic content. The static content can be cached on the reverse proxy while the web server will be freed up to better handle the dynamic content. Squid caches css/js/image files.
  • 17.
    Caching Built-in caching:Enabled CSS Aggregation: Enabled JS Aggregation: Enabled Block Cache: Enabled. Static blocks were cached. Boost: Turned off. Had problems at lot of steps. Memcache using Cacherouter
  • 18.
    Memcache All cachetables except for cache_form stored in Memcache 6 instances running on each port for each cache table: cache, cache_content, cache_page, cache_views. Sessions stored in memcache Cache_form cached using filecache Cacherouter module used Memcache module to store session
  • 19.
    Memcache-2 Following “difficult”tried-and-testing configuration on settings.php: $conf = array(   'cache_inc' => './sites/all/modules/cacherouter/cacherouter.inc', 'session_inc' => './sites/all/modules/memcache/memcache-session.inc',   'memcache_servers' => array(     'localhost:11212' => 'cluster2',   ),   'memcache_bins' => array(     'session' => 'cluster2'   ),
  • 20.
    Memcache-2 'cacherouter' =>array( 'cache_page' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11211'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11213'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_menu' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11214'), 'shared'=>FALSE, 'prefix'=>'', ),
  • 21.
    'cache_filter' => array('engine' => 'memcache', 'servers'=> array('localhost:11215'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_block' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11216'), 'shared'=>FALSE, 'prefix'=>'', ), 'cache_content' => array( 'engine' => 'memcache', 'servers'=> array('localhost:11217'), 'shared'=>FALSE, 'prefix'=>'', ), 'default' => array(     'engine' => 'file',    'servers' => array(),     'shared' => TRUE,     'prefix' => '',     'path' => 'sites/default/files/filecache',     'static' => FALSE,     'fast_cache' => TRUE,   ), ), );
  • 22.
    Special Thanks to Mr. Alan Jacobson Founder of Tweentribune for his ongoing support, patience and confidence in us!
  • 23.
  • 24.
    Contact Us USoffice 1 Autumn Ct. East Windsor, CT 06088 USA M:- (203) 550 4089 (510) 629 4253 India office E-160, Sector 63 Noida – 201301 India P:- +91120 4209635 W: http://www.ebizontek.com/ E : [email_address]
  • 25.