Download - Barcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014
Introduction to AWS
Edison Wong2014 Oct 4th
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
PantaRei Design
● Hong Kong based Free and Open Source Software (FOSS) service provider– Content Management System (CMS) with Drupal
– Cloud hosting with Amazon Web Services (AWS)
– Team collaborate solution with Atlassian
● 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
Outline
● What is Amazon Web Services (AWS)?● What Can I Do with AWS?● Web Application Hosting● Fault Tolerance & High Availability
What is AWS?
● Amazon Web Services (AWS)– Cloud computing
– Infrastructure as a service (IaaS)
– Provides computing resource and services
– Pay-as-you-go pricing
What is AWS? (cont.)
● History– 1994: Founded by Jeff Bezos
● Initial product with online virtual bookstore
– 2000: Survived the dot-com bubble burst● Lots of infrastructure (some said ~90%) idled● Need some way to utilize such resource
– 2003: Why not resell the resource DIRECTLY?
– 2006: AWS officially launched
What is AWS? (cont.)
● AWS Management Console– Web-based user interface
– Access all AWS service in one place
● https://console.aws.amazon.com/
What Can I Do with AWS?
● Foundation Services– Deploy IT infrastructure in the cloud
– Compute, storage, database, etc
● Application Services– Add functionality to application
– Search, messaging, CDN, etc
● Administration Services– Manage AWS resources
– Identity, monitoring, deployment, etc
What Can I Do with AWS? (cont.)
● Route 53● CloudFront● Simple Storage Service (S3)● Elastic Compute Cloud (EC2)● Elastic Block Store (EBS)● Auto Scaling● Relational Database Service (RDS)● … and more!!
Route 53
● Domain Name System (DNS)● ONLY provide domain name management
– You need to register domain name somewhere else
● USD0.50 per hosted zone / month
CloudFront
● Content Delivery Network (CDN)● Serve content to end-users with high availability and high
performance● Distribute static or dynamic content, e.g.
– .html
– .css
– .js
– .php
– Image
– Video, etc
Simple Storage Service (S3)
● Stores and retrieves digital files● Object storage● Can serve static content website DIRECTLY!!● NOT FTP!!
Elastic Compute Cloud (EC2)
● Virtual computing– Seems like VMWare, VirtualBox or Virtual PC
● Resizable computing capacity, e.g.– m3.medium: 1 vCPU, 3.75GB RAM
– m3.2xlarge: 8 vCPU, 30GB RAM (!?)
● Can run with Linux (e.g. Ubuntu, RedHat) orWindows instance
Elastic Block Store (EBS)
● Block storage● Persistent file system for EC2● Seems like physical harddisk in PC● Up to 1TB per disk
– Always use LVM under Linux for liveadd/remove/update partition management!!
Auto Scaling
● Add or remove EC2 dynamically● Scale-up or scale-down due to peaks and lulls
in traffic
Relational Database Service (RDS)
● Database-as-a-Service● Support MySQL, Oracle or SQL Server● Support multiple Available Zone (AZ) High
Availability (HA) setup by default– P.S. Multiple instance required (i.e. more $$)
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
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
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
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
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)
Q&A
References
● http://www.slideshare.net/davinken/amazon-web-services-history-overview-presentation
● http://aws.amazon.com/architecture/
● http://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/gsg-aws-intro.html
● http://docs.aws.amazon.com/cloudhsm/latest/gsg/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
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/