700 likes | 865 Views
Scaling. ThisM. I’m not as cool as Zach. There’s no picture for this, it would change too much. The “Living and Evolving” AWS Cloud. Your Application. Tools to access services. Libraries and SDKs .NET/Java etc. Web Interface Management Console. Tools AWS Toolkit for Eclipse.
E N D
ThisM I’m not as cool as Zach
The “Living and Evolving” AWS Cloud Your Application Tools to access services Libraries and SDKs .NET/Java etc. Web Interface Management Console Tools AWS Toolkit for Eclipse Command Line Interface Cross Service features Authentication and AuthorizationAWS IAM, MFA Monitoring Amazon CloudWatch Deployment and Automation AWS Elastic BeanstalkAWS CloudFormation Platform building blocks Parallel Processing Amazon Elastic MapReduce Payments Amazon DevPay Amazon FPS • Content Delivery Amazon CloudFront Workforce Amazon Mechanical Turk Messaging Amazon SNS Amazon SQS Email Amazon SES Infrastructure building blocks Compute Amazon EC2 Storage Amazon S3 Amazon EBS Network Amazon VPC Elastic LB Amazon Route 53 Database Amazon RDS Amazon SimpleDB Amazon Global Physical Infrastructure (Geographical Regions, Availability Zones, Edge Locations)
Each day, AWS adds the equivalent server capacity to power Amazon when it was a global, $2.76B enterprise (circa 2000)
The Cloud Scales: Amazon S3 Growth 566 Billion Peak Requests: 370,000+per second 262 Billion 102 Billion 40 Billion 14 Billion 2.9 Billion Total Number of Objects Stored in Amazon S3
Global Infrastructure for Global Enterprises Asia Pacific Region (Tokyo) US West (Northern California) US East (Northern Virginia) Europe West (Dublin) Asia Pacific Region (Singapore) GovCloud (US ITAR Region) AWS Regions AWS Edge Locations
Powerful Highly scalable, Highly available, Highly responsive Fault-tolerant, Cost-effective globally deployed Web application
Seriouslyradwebsite.com Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets Amazon S3 MySQL Backups
Seriouslyradwebsite.com Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets Amazon S3 MySQL Backups
Seriouslyradwebsite.com Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets LogsStatic Data Amazon S3 MySQL Backups Root Volume Data Volume Snapshots Amazon EBS
Seriouslyradwebsite.com Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets LogsStatic Data Amazon S3 MySQL Backups Root Volume Data Volume Snapshots Amazon EBS
Media.Seriouslyradwebsite.com (static data) Seriouslyradwebsite.com (dynamic data) Distribution Amazon CloudFront Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets LogsStatic Data Amazon S3 MySQL Backups Root Volume Data Volume Snapshots Amazon EBS
Media.seriouslyradwebsite.com (static data) Seriouslyradwebsite.com (dynamic data) Distribution Amazon CloudFront Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets LogsStatic Data Amazon S3 MySQL Backups Root Volume Data Volume Snapshots Amazon EBS
Seriouslyradwebsite.com (static data) Seriouslyradwebsite.com (dynamic data) Distribution Amazon CloudFront Elastic IP Availability Zone #1 Amazon EC2 Instance Apache Buckets Logs Static Data PHP Mod Amazon S3 MySQL Backups Amazon RDS
Seriouslyradwebsite.com staging.Seriouslyradwebsite.com Dynamic IP 172.3.1.4 Elastic IP183.2.3.1 Availability Zone #1 Cloud Tip: Smart use of Elastic IPs (when upgrading new versions of your app) Staging EC2 Instance Production EC2 Instance App v1.2 App v1.1 Apache Apache PHP Mod PHP Mod Production EC2 Instance MySQL Amazon RDS
Media.Seriouslyradwebsite.com (static data) Seriouslyradwebsite.com (dynamic data) Distribution Amazon CloudFront Elastic IP Availability Zone #1 Amazon EC2 Instance Apache Buckets Logs Static Data PHP Mod Amazon S3 MySQL Backups Amazon RDS
Principles of elastic cloud architectures • Resilient to reboot and re-launch: • Design the system such that in the event of a failure, it is resilient enough to automatically re-launch and restart. Forcefully fail and test. • Stateless: • Extract stateful components out and make them stateless • Packable into an AMI: • Package and deploy your application into an AMI so it can run on an Amazon EC2 instance. Try to run multiple instances of the application on one EC2 instance, if needed. Run multiple instances on multiple Amazon EC2 instances. • Decouple: • Isolate the components using Amazon SQS. Decouple code with deployment and configuration.
media.myphpwebsite.com (static data) www.myphpwebsite.com (dynamic data) Distribution Amazon CloudFront Elastic IP Availability Zone #1 Amazon Machine Image Amazon EC2 Instance Apache Buckets Logs Static Data PHP Mod Amazon S3 MySQL Backups Amazon RDS
www.myphpwebsite.com (dynamic data) media.myphpwebsite.com (static data) Amazon Route 53 (DNS) Elastic Load Balancer LB Distribution Amazon CloudFront Availability Zone #1 AutoScaling Group Amazon Machine Image Amazon EC2 Instance Apache Buckets Logs Static Data PHP Mod Amazon S3 MySQL Backups Amazon RDS
www.myphpwebsite.com (dynamic data) media.myphpwebsite.com (static data) Amazon Route 53 (DNS) Elastic Load Balancer LB Distribution Amazon CloudFront Availability Zone #1 AutoScaling Group Amazon EC2 Instance Apache Buckets Amazon SNS (notifications) Logs Static Data PHP Mod Amazon S3 Amazon SimpleDB (Catalog and Config data) MySQL Amazon CloudWatch (Monitoring) Backups Amazon RDS
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) Elastic Load Balancer LB media.myphpwebsite.com (static data) Availability Zone #1 AutoScaling group : Web App Tier Apache Apache Amazon SNS (notifications) Distribution Amazon CloudFront PHP Mod PHP Mod Amazon EC2 Amazon SimpleDB (Catalog and Config data) Buckets MySQL Amazon S3 Amazon RDS Amazon CloudWatch (Monitoring)
Tight Coupling Controller A Controller B Controller C Q Q Q Loose Coupling using Queues Controller A Controller B Controller C Cloud Tip: Decouple components. The looser they're coupled, the bigger they scale
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) Elastic Load Balancer LB media.myphpwebsite.com (static data) Availability Zone #1 AutoScaling group : Web App Tier Apache Apache Amazon SNS (notifications) Distribution Amazon CloudFront PHP Mod PHP Mod Amazon EC2 Amazon SimpleDB (Catalog and Config data) Buckets MySQL Amazon S3 Amazon RDS Amazon CloudWatch (Monitoring)
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) Elastic Load Balancer LB media.myphpwebsite.com (static data) Availability Zone #1 AutoScaling group : Web App Tier Apache Apache Availability Zone #2 Distribution Amazon CloudFront PHP Mod PHP Mod Amazon EC2 Buckets Failover Primary Multi-AZ Amazon S3 Amazon RDS Synchronous Replication Standby Slave Amazon RDS
Pattern #5: Isolate read and write traffic; Isolate static and dynamic traffic
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) Elastic Load Balancer LB Distribution Amazon CloudFront Availability Zone #1 Amazon EC2 AutoScaling group : Web App Tier Apache Apache Availability Zone #2 PHP Mod PHP Mod Failover Read Replica Buckets Primary Master Async Replication Read Replica Amazon S3 Amazon RDS Synchronous Replication Standby Multi-AZ Amazon RDS
Pattern #6: Automate your in-cloud Software Development and Deployment Lifecycle
YAGNI-UYRNI(You ain’tgonna need it, until you really need it)
Hello, I am Mr. Automate Development And Testing Automate Using Cloud APIs Staging and Production Monitoring Build and Deployment
Keep absolutely everything in version control Commit early and commit often Always check in to trunk and avoid branching Take responsibility if your check in breaks the build Automate the build, test, deploy process Be prepared to stop the mainline when/if build breaks Create a comprehensive automated test suite Only one way deploy and everybody uses that same way Be prepared to revert to the previous revision Continuously improve collaboration and increase speed of feedback
Application Containers - JBoss, Tomcat, IIS, Mongrel. NOTE: there are so many app containers, I'm not going to try to list all of them.Build Tools - Ant, AntContrib, NAnt, MSBuild, Buildr, Gant, Gradle, make, Maven, RakeCode Review - CrucibleCode Insight - FisheyeContinuous Integration - Bamboo, Jenkins, AntHill Pro, Go, TeamCity, TFS 2010Database - Hibernate, MySQL, Liquibase, Oracle, PostgreSQL, SQL Server, SimpleDB, SQL Azure, Ant, MongoDBDatabase Change Management - dbdeploy, LiquibaseData Center Configuration Automation - Capistrano, Cobbler, BMC Bladelogic, CFEngine, IBM Tivoli Provisioning Manager, Puppet, Chef, Bcfg2, AWS Cloud Formation, Windows Azure AppFabricNOTE: There are many names and overlap for this tool "category". Dependency Management - Ivy, Archiva, Nexus, Artifactory, BundlerDeployment Automation - Java Secure Channel, ControlTier, Altiris, Capistrano, Fabric, FuncInformation Sharing - Confluence, Google AppsInstaller - InstallShield, IzPackIntegrated Development Environment (IDE) - Eclipse, IDEA, Visual StudioIssue Tracking - Greenhopper, JIRAMulti-Type - rPathPasswords - PassPack, PasswordSafeProtected Configuration - ESCAPE, ConfigGenProject Management - JIRA, Pivotal Tracker, SmartSheetProvisioning - JEOS, BoxGrinder, CLIP, Eucalyptus, AppLogicReporting/Documentation - Doxygen, Grand, GraphViz, JavaDoc, NDoc, SchemaSpy, UmlGraphStatic Analysis - CheckStyle, Clover, Cobertura, FindBugs, FxCop, JavaNCSS, JDepend, PMD, Sonar, SimianSystems Monitoring - CloudKick, Nagios, Zabbix, ZenossTestingAntUnit, Cucumber, DbUnit, webrat, easyb, Fitnesse, JMeter, JUnit, NBehave, SoapUI, Selenium, RSpec,SauceLabsVersion-Control System - SVN/Subversion, git, Perforce Paul Duvall’s Blog http://blog.stelligent.com/integrate-button/2011/03/list-of-software-tools-for-continuous-delivery-in-the-cloud.html
Application Containers - JBoss, Tomcat, IIS, Mongrel. NOTE: there are so many app containers, I'm not going to try to list all of them.Build Tools - Ant, AntContrib, NAnt, MSBuild, Buildr, Gant, Gradle, make, Maven, RakeCode Review - CrucibleCode Insight - FisheyeContinuous Integration - Bamboo, Jenkins, AntHill Pro, Go, TeamCity, TFS 2010Database - Hibernate, MySQL, Liquibase, Oracle, PostgreSQL, SQL Server, SimpleDB, SQL Azure, Ant, MongoDBDatabase Change Management - dbdeploy, LiquibaseData Center Configuration Automation - Capistrano, Cobbler, BMC Bladelogic, CFEngine, IBM Tivoli Provisioning Manager, Puppet, Chef, Bcfg2, AWS Cloud Formation, Windows Azure AppFabricNOTE: There are many names and overlap for this tool "category". Dependency Management - Ivy, Archiva, Nexus, Artifactory, BundlerDeployment Automation - Java Secure Channel, ControlTier, Altiris, Capistrano, Fabric, FuncInformation Sharing - Confluence, Google AppsInstaller - InstallShield, IzPackIntegrated Development Environment (IDE) - Eclipse, IDEA, Visual StudioIssue Tracking - Greenhopper, JIRAMulti-Type - rPathPasswords - PassPack, PasswordSafeProtected Configuration - ESCAPE, ConfigGenProject Management - JIRA, Pivotal Tracker, SmartSheetProvisioning - JEOS, BoxGrinder, CLIP, Eucalyptus, AppLogicReporting/Documentation - Doxygen, Grand, GraphViz, JavaDoc, NDoc, SchemaSpy, UmlGraphStatic Analysis - CheckStyle, Clover, Cobertura, FindBugs, FxCop, JavaNCSS, JDepend, PMD, Sonar, SimianSystems Monitoring - CloudKick, Nagios, Zabbix, ZenossTestingAntUnit, Cucumber, DbUnit, webrat, easyb, Fitnesse, JMeter, JUnit, NBehave, SoapUI, Selenium, RSpec,SauceLabsVersion-Control System - SVN/Subversion, git, Perforce DO USE YES GOOD Paul Duvall’s Blog http://blog.stelligent.com/integrate-button/2011/03/list-of-software-tools-for-continuous-delivery-in-the-cloud.html
CloudFormation Templates for Env Repo Generate Package Builder Config Install Create AMIs Push Code Config Tests Test Env Deploy Server Version Control CI Server Staging Env Pull Code Commit to Git/master Prod Env Dev Distributed Builds Run Tests in parallel Send Build Report to Dev Stop everything if build failed Cloud Continuous Integration
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) Elastic Load Balancer LB Distribution Amazon CloudFront Availability Zone #1 Amazon EC2 AutoScaling group : Web App Tier Apache Apache Availability Zone #2 PHP Mod PHP Mod Failover Read Replica Buckets Primary Master Async Replication Read Replica Amazon S3 Amazon RDS Synchronous Replication Standby Multi-AZ Amazon RDS
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) Elastic Load Balancer LB Distribution Amazon CloudFront Availability Zone #1 Amazon EC2 AutoScaling group : Web App Tier Apache Apache Availability Zone #2 PHP Mod PHP Mod Failover Read Replica Buckets Primary Master Async Replication Read Replica Amazon S3 Amazon RDS Synchronous Replication Standby Multi-AZ Amazon RDS
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) LB Elastic Load Balancer Distribution Availability Zone #1 Amazon CloudFront AutoScaling group : Web Tier Availability Zone #2 Apache Apache Amazon EC2 PHP Mod PHP Mod cache Tier Memcache Memcache Tomcat Buckets RDS Master Amazon S3 RDS MultiAZ
In the cloud, Security is a Shared Responsibility SAS 70 Type II Audit ISO 27001/2 Certification PCI DSS 2.0 Level 1-5 HIPAA/SOX Compliance FISMA A&A Low Encrypt data in transit Encrypt data at rest Protect your AWS Credentials Rotate your keys Secure your application, OS, Stack and AMIs How we secure our infrastructure How can you secure your application and what is your responsibility? Enforce IAM policies Use MFA, VPC, Leverage S3 bucket policies, EC2 Security groups, EFS in EC2 Etc.. What security options and features are available to you?
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) LB Elastic Load Balancer # Permit HTTP(S) access to Web Layer from the Entire Internetec2auth Web -p 80,443 -s 0.0.0.0/0 # Permit Web Layer access to App Layer ec2auth App -p 8000 -s 1.2.3.4/32 # Permit App Layer access to DB ec2auth App -p 3209 -s 1.2.3.4/32 # Permit administrative access SSH to all three layersec2auth Web -p 22 -o Appec2auth DB -p 22 -o App Distribution Availability Zone #1 Amazon CloudFront AutoScaling group : Web Tier Availability Zone #2 Apache Apache Amazon EC2 PHP Mod PHP Mod Cache Tier Memcache Memcache Tomcat Buckets RDS Master Amazon S3 RDS Slave
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) LB Elastic Load Balancer Distribution Availability Zone #1 Amazon CloudFront AutoScaling group : Web Tier Availability Zone #2 Apache Apache Amazon EC2 PHP Mod PHP Mod cache Tier Memcache Memcache Tomcat Buckets RDS Master Amazon S3 RDS MultiAZ
www.myphpwebsite.com (dynamic data) Amazon Route 53 (DNS) media.myphpwebsite.com (static data) LB Elastic Load Balancer Availability Zone #1 Availability Zone #2 AutoScaling group : Web Tier AutoScaling group : Web Tier Availability Zone #n Distribution Apache Apache Apache Apache Amazon EC2 Amazon CloudFront PHP Mod PHP Mod PHP Mod PHP Mod Cache Tier Cache Tier Memcache Memcache Memcache Memcache Tomcat Tomcat Buckets Multi-AZ Slave DB Master Read Replica Amazon RDS Amazon S3
Seriouslyradwebsite.com Elastic IP Availability Zone #1 Amazon EC2 Instance Apache PHP Mod Buckets Amazon S3 MySQL Backups