Download - Hong Kong Drupal User Group - Sep 13th
![Page 1: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/1.jpg)
Hong Kong Drupal User Group(HKDUG)
Introduction of High Availability (HA)on Web Application
DrupalCamp Hong Kong2014 Sep 13th
![Page 2: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/2.jpg)
Edison Wong
● CEO, PantaRei Design– [email protected]
● Drupal developer & contributor– https://drupal.org/user/33940
● HKDUG Co-founder– https://groups.drupal.org/drupalhk
● Startup founder– 2009 - PantaRei Design founded
– 2010 - YBHK applicant
– 2011 - ITF SERAP applicant
– 2011 - HKSTP Incu-Tech applicant
![Page 3: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/3.jpg)
PantaRei Design
● Hong Kong based Free and Open Source Software (FOSS) serviceprovider– Content Management System (CMS) with Drupal
– Cloud hosting with Amazon Web Services (AWS)
● Business Partnership– 2012 - AWS Consulting Partner
– 2013 - Acquia Partner
– 2013 - Atlassian Experts
– 2014 - Rackspace Hosting Partner
● FOSS Contributor– 2008 - Hong Kong Drupal User Group Co-founder
– 2012 - Drupal Services Provider
![Page 4: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/4.jpg)
![Page 5: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/5.jpg)
![Page 6: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/6.jpg)
![Page 7: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/7.jpg)
![Page 8: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/8.jpg)
![Page 9: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/9.jpg)
Outline
● Web Application Hosting● Fault Tolerance & High Availability● Related Drupal Modules
![Page 10: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/10.jpg)
Web Application Hosting
● LAMP– a.k.a. Linux, Apache, MySQL and PHP
– Most common system architecture for Drupal
● Ubuntu 14.04 LTS– Apache 2.4
– MySQL 5.5
– PHP 5.5
– Drupal 7.x compatible
![Page 11: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/11.jpg)
Web Application Hosting (cont.)
● Virtualmin– http://www.virtualmin.com/
– FOSS Web-based system management GUI
● Manage (almost) everything for virtual hosting– DNS (Bind9)
– Mail (Postfix) + spam filter (Spamassassin) + virus filter (ClamAV)
– Web (Apache) + PHP
– Database (MySQL, PostgreSQL)
● Our one-line script for installation (Ubuntu 14.04 LTS):– https://github.com/phpshift/virtualmin-installer
![Page 12: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/12.jpg)
![Page 13: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/13.jpg)
Web Application Hosting (cont.)
● AWS (Amazon Web Service)– CDN (Content Delivery Network)
– AZ (Available Zone)
– RDS (Relational Database Service)
● Can scale-out and scale-up in a flexible style– EC2
– Elastic Load Balancing
– Auto Scaling
![Page 14: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/14.jpg)
![Page 15: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/15.jpg)
Fault Tolerance & High Availability
● Hot Spare ($$$$$)– Real-time sync and replacement on failure
– Usually combine with performance scale-out
● Warm Spare ($$)– Maybe async and replace during failure
– May not as powerful as master setup
● Cold Spare ($)– Usually periodically backup to similar setup
– May even just backup useful data for restore
– Need more time for resume during failure
![Page 16: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/16.jpg)
Fault Tolerance & High Availability(cont.)
● About 99.99%– 1m (weekly), 4m19s (monthly) or 52m33s (yearly)
● Solution– Implement multiple layer, e.g. web, application,
database, storage, etc
– Each layer coming with failover and recoverysolution
– e.g. MySQL in master-slave replication (or AWSRDS)
![Page 17: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/17.jpg)
![Page 18: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/18.jpg)
Related Drupal Modules
● CDN– https://www.drupal.org/project/cdn
● Varnish– https://www.drupal.org/project/varnish
● Memcache– https://www.drupal.org/project/memcache
● Entity cache– https://www.drupal.org/project/entitycache
![Page 19: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/19.jpg)
Related Drupal Modules (cont.)$conf['page_cache_invoke_hooks'] = FALSE;
$conf['lock_inc'] = './profiles/drustack/modules/contrib/memcache/memcache-lock.inc';
$conf['cache_backends'][] = './profiles/drustack/modules/contrib/memcache/memcache.inc';
$conf['cache_backends'][] = './profiles/drustack/modules/contrib/varnish/varnish.cache.inc';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['cache_class_cache_page'] = 'VarnishCache';
$conf['cache_class_cache_update'] = 'DrupalDatabaseCache';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = $databases['default']['default']['database'];
$conf['memcache_servers'] = array(
'localhost:11211' => 'default',
);
$conf['memcache_bins'] = array(
'cache' => 'default',
);
![Page 20: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/20.jpg)
Q&A
![Page 21: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/21.jpg)
References
● http://aws.amazon.com/architecture/● http://docs.aws.amazon.com/cloudhsm/latest/gs
g/ha-best-practices.html● http://www2.safenet-inc.com/AWS-guides/Luna
_High_Availability_and_Load_Balancing_TN2013_revA.pdf
● http://www.slideshare.net/BarcampSaigonOrganizer/high-availability-how-to-get-9999-service-availabilty-designing-clusters-dos-donts
![Page 22: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/22.jpg)
I Need More Help!
● Read documents from Drupal Community– https://drupal.org/documentation
● Join Hong Kong Drupal User Group– Event organizing: http://www.meetup.com/drupalhk
– Technological discussion: https://groups.drupal.org/drupalhk
– Business connection: http://www.linkedin.com/groups/?gid=6644792
– General sharing: https://www.facebook.com/groups/drupalhk
● Contact us for one (1) month free-trial support service– http://pantarei-design.com/services/support/#support-service-plan
s
![Page 23: Hong Kong Drupal User Group - Sep 13th](https://reader034.vdocument.in/reader034/viewer/2022042613/548332feb4af9f9b0d8b49cc/html5/thumbnails/23.jpg)
Thank You
● Please feel free to contact us:– Unit 207, 2/F IC Development Centre, No.6 Science
Park West Avenue, Hong Kong Science Park,Shatin, N.T.
– +852 3576 3812
– http://pantarei-design.com/