23
Hong Kong Drupal User Group (HKDUG) Introduction of High Availability (HA) on Web Application DrupalCamp Hong Kong 2014 Sep 13th

Hong Kong Drupal User Group - Sep 13th

Embed Size (px)

DESCRIPTION

Introduction of High Availability (HA) on Web Application

Citation preview

Page 1: Hong Kong Drupal User Group - Sep 13th

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

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

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
Page 5: Hong Kong Drupal User Group - Sep 13th
Page 6: Hong Kong Drupal User Group - Sep 13th
Page 7: Hong Kong Drupal User Group - Sep 13th
Page 8: Hong Kong Drupal User Group - Sep 13th
Page 9: Hong Kong Drupal User Group - Sep 13th

Outline

● Web Application Hosting● Fault Tolerance & High Availability● Related Drupal Modules

Page 10: Hong Kong Drupal User Group - Sep 13th

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

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
Page 13: Hong Kong Drupal User Group - Sep 13th

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
Page 15: Hong Kong Drupal User Group - Sep 13th

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

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
Page 18: Hong Kong Drupal User Group - Sep 13th

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

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

Q&A

Page 22: Hong Kong Drupal User Group - Sep 13th

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

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/

[email protected]