Upload
amazon-web-services
View
2.640
Download
1
Embed Size (px)
Citation preview
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
Content Management Systems on AWSDeep Dive
Leo Zhadanovsky, Senior Solutions Architect, AWS@leozh
Compute
EC2Virtual servers in the cloud
Elastic Compute Cloud
• Resizable compute capacity in over 30 instance types• Reduces the time required to obtain and boot new server instances
to minutes or seconds• Scale capacity as your computing requirements change• Pay only for capacity that you actually use• Choose Linux or Windows• Deploy across Regions and Availability Zones for reliability• Support for virtual network interfaces that can be attached to EC2
instances in your VPC
Compute
EC2Virtual servers in the cloud
Amazon Machine Image
• Building blocks of EC2 instances• An AMI is like a template of a computer's root volume.• Can be public or private and shared with other accounts • Create hardened or gold “Images” of your EC2 infrastructure• Copy AMIs between regions
Compute
EC2Virtual servers in the cloud
Auto Scaling
• Client Defined Business Rules• Scale your Amazon EC2 capacity automatically once you define the
conditions (may be 1000’s of servers)• Can scale up just a little…doesn’t need to be massive number of
servers (may be simply 2 servers)• Well suited for applications that experience variability in usage• Set minimum and maximum scaling policies• Alternate Use is for Fault Tolerance
Compute
EC2Virtual servers in the cloud
Elastic Load Balancing
• Supports the routing and load balancing of HTTP, HTTPS and generic TCP traffic to EC2 instances
• Supports SSL termination and Proxy protocol• Supports health checks to ensure detect and remove failing
instances• Dynamically grows and shrinks required resources based on traffic• Seamlessly integrates with Auto-scaling to add and remove instances
based on scaling activities• Single CNAME provides stable entry point for DNS configuration• Supports internal load balancing within a VPC
Storage
S3Scalable Storage in the Cloud
Simple Storage Service
• A “Bucket” is equivalent to a “folder”• Able to store unlimited number of Objects in a Bucket• Objects from 1B-5 TB; no bucket size limit• Highly available storage for the Internet (object store)• HTTP/S endpoint to store and retrieve any amount of data, at any
time, from anywhere on the web• Highly scalable, reliable, fast, and inexpensive• Annual durability of 99.999999999%• Designed for 99.99% availability • Over 2 trillion objects stored• Peak requests 1,100,000+ per second
Storage
CloudFront
• Web service for content delivery• Distribute content to end users with low latency, high data transfer
speeds, and no commitments• Delivers your content using a global network of 40+ edge locations• Supports download, streaming, live streaming, and dynamic content
– Key features: RTMP Streaming, HTTPS Delivery, Private Content for HTTP & Streaming, Programmatic Invalidation, Detailed Logs for HTTP & Streaming, Default Root Object
• Use Cases: Video and Rich Media, Online Gaming, Interactive Agencies, Software Downloads, Static Websites
– Static web content that must be delivered to global user base at Highest bandwidth / Lowest latency / Lowest cost
S3Scalable Storage in the Cloud
CloudFrontGlobal Content Delivery Network
Database
Relational Database Service
• Fully-managed, tuned MySQL, PostgreSQL, Oracle 11g, or MS SQL• Cost-efficient and resizable capacity• Manages time-consuming database admin tasks• Code, applications, and tools you already use today work seamlessly • Automatically patches the database software and backs up your
database• Flexible Licensing: BYOL or License Include• Multi-AZ deployment option for MySQL, PostgreSQL and Oracle• Cross-Region Read Replica support for MySQL
RDSManaged Relational Database Service
Database
ElastiCache
• Fully-managed, distributed, in-memory cache• Memcached or Redis cache cluster on-demand• Manages patching, cache node failure detection and recovery• Simple APIs calls to grow and shrink the cache cluster• Seamlessly caches in front of RDS instances• Integrated with CloudWatch and SNS for monitoring and alerts
RDSManaged Relational Database Service
ElastiCacheIn-Memory Cache
Simple CMS Architecture
EC2 Instance with WordPress and
MySQL
Availability Zone
HA CMS Architecture
WordPress servers
Availability Zone A Availability Zone B
WordPress serversAuto Scaling Group
Elastic Load Balancer
RDS MySQL Primary RDS MySQL Standby
S3 Bucket with Static
Media
Advanced HA CMS Architecture
Jenkins (on EC2 instance)
WordPress servers
Availability Zone A Availability Zone B
WordPress serversAuto Scaling Group
Elastic Load Balancer
RDS MySQL Primary RDS MySQL Standby
ElastiCache Cache Node
ElastiCache Cache Node
Amazon Cloudfront
AWS CodeDeployGitHub
AVAILABLENOW
GitHub
Developer S3 bucket
Jenkins (on EC2 instance)
1. Push code to remote repository
2. CodePipeline polls GitHub for new commits
3. CodePipeline pulls new commits into ZIP file in S3
5. Jenkins runs tests on code and notifies CodePipeline of results
7. Servers download and install
AWS CodeDeploy
6. Servers are notified of deployment
4. Jenkins polls CodePipeline for new activity
Deployment overview
WordPress servers(Auto Scaled)
8. CodeDeploy is notified of success or failure
AWS CodePipeline
CodeDeploy Lifecycle Events
AWS CodeDeploy
Elastic Load Balancer
Target Instance
S3 bucket1. ApplicationStop
• Deregister from load balancer
• Stop server
3. BeforeInstall• Delete old version• Install dependencies• Install New Relic agents
2. DownloadBundle
4. Install
5. AfterInstall• Update permissions• Download config/creds• Mark deployment in New
Relic
6. ApplicationStart• Start server• Register with load balancer
0. Instance is notified of new deployment
7. ValidateServiceCodeDeploy is notified of successful deployment
CodeDeploy Default Deployment Configs
AllAtOnce
OneAtATime
HalfAtATime
CodeDeploy Custom Deployment Configs
HOST_COUNT FLEET_PERCENT = 80No less than 80% of hosts should be healthy during deploy
No less than 10 hosts should be healthy during deploy, regardless of the number of instances
= 10
Failed Deployments in CodeDeploy
Deploy version 1.5
Deployto OK
?Yes
Deploy Failed
Deployto OK
?Yes
Deployto OK
?Yes
No No No
Done
version 1.4
Recover from a failed or canceled deployment by creating a new
deployment of the previous version