barcamp macau 2014 - introduction to aws
DESCRIPTION
What is Amazon Web Services (AWS)? What Can I Do with AWS? Web Application Hosting Fault Tolerance & High AvailabilityTRANSCRIPT
![Page 1: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/1.jpg)
Barcamp Macau 2014
Introduction to AWS
Edison Wong2014 Oct 4th
![Page 2: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/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: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/3.jpg)
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
![Page 4: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/4.jpg)
![Page 5: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/5.jpg)
![Page 6: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/6.jpg)
![Page 7: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/7.jpg)
Outline
● What is Amazon Web Services (AWS)?● What Can I Do with AWS?● Web Application Hosting● Fault Tolerance & High Availability
![Page 8: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/8.jpg)
What is AWS?
● Amazon Web Services (AWS)– Cloud computing
– Infrastructure as a service (IaaS)
– Provides computing resource and services
– Pay-as-you-go pricing
![Page 9: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/9.jpg)
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
![Page 10: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/10.jpg)
![Page 11: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/11.jpg)
What is AWS? (cont.)
● AWS Management Console– Web-based user interface
– Access all AWS service in one place
● https://console.aws.amazon.com/
![Page 12: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/12.jpg)
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
![Page 13: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/13.jpg)
![Page 14: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/14.jpg)
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!!
![Page 15: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/15.jpg)
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
![Page 16: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/16.jpg)
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
![Page 17: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/17.jpg)
Simple Storage Service (S3)
● Stores and retrieves digital files● Object storage● Can serve static content website DIRECTLY!!● NOT FTP!!
![Page 18: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/18.jpg)
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
![Page 19: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/19.jpg)
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!!
![Page 20: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/20.jpg)
Auto Scaling
● Add or remove EC2 dynamically● Scale-up or scale-down due to peaks and lulls
in traffic
![Page 21: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/21.jpg)
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 $$)
![Page 22: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/22.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 23: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/23.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 24: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/24.jpg)
![Page 25: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/25.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 26: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/26.jpg)
![Page 27: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/27.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 28: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/28.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 29: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/29.jpg)
![Page 30: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/30.jpg)
Q&A
![Page 31: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/31.jpg)
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
![Page 32: Barcamp Macau 2014 - Introduction to AWS](https://reader033.vdocuments.net/reader033/viewer/2022052905/5587405bd8b42a5f388b46da/html5/thumbnails/32.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/