Devnexus slides - Amazon Web Services
-
Upload
tom-elrod -
Category
Technology
-
view
261 -
download
5
description
Transcript of Devnexus slides - Amazon Web Services
![Page 1: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/1.jpg)
Amazon Web Services Going from development to produc9on
![Page 2: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/2.jpg)
Introduc9on
Tom Elrod – CTO @ Make & Build
We build cool stuff
![Page 3: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/3.jpg)
![Page 4: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/4.jpg)
![Page 5: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/5.jpg)
Narrowing the field
EC2
Elas-c Load Balancer
RDS
CloudForma-on
CloudFront
S3 Bucket
Route 53
![Page 6: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/6.jpg)
Beer Survey Web Applica9on
![Page 7: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/7.jpg)
Beer Survey – Tech Stack
Bootstrap Angular
Node.js
MySQL
Presenta9on
Business Logic
Persistence
![Page 8: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/8.jpg)
Beer Survey – Architecture
Bootstrap Angular
Node.js
MySQL
Client (browser)
Server
Database
REST
SQL
![Page 9: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/9.jpg)
Development Environment
nodeJS
node.js
EC2
Amazon Web Services
Web Browser
![Page 10: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/10.jpg)
Development Environment
nodeJS
node.js
EC2
Amazon Web Services
22 (ssh) 8080 (hVp)
3306 (mysql)
![Page 11: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/11.jpg)
Produc9on Environment
nodeJSEC2
Web Browser
Elas9c Load Balancer
S3 Bucket CloudFront
nodeJSEC2
Amazon Web Services
![Page 12: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/12.jpg)
Produc9on Environment
nodeJSEC2 Elas9c
Load Balancer
S3 Bucket CloudFront
nodeJSEC2
Amazon Web Services
80,443 (hVp,hVps) 8080,22 (hVp,ssh)
3306 (mysql)
![Page 13: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/13.jpg)
EC2
• Virtual servers that can run applica9ons • Provision new server instances in minutes • Pay only for capacity actually used • Up to 20 instances per account (apply for more)
• Tip: Do not use for sending email
![Page 14: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/14.jpg)
Regions
US East (N. Virginia) $ Asia Pacific (Singapore) $$$
US West (Oregon) $ Asia Pacific (Tokyo) $$$$
US West (N. California) $$ Asia Pacific (Sydney) $$$
South America (Sao Paulo) $$$ EU (Ireland) $$
![Page 15: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/15.jpg)
Instant Type Families Family Types Popular Use cases
General Purpose M1, M3 Small and mid-‐size databases, data processing, encoding, and caching.
Compute-‐op9mized C1, CC2, C3
High-‐traffic web applica9ons, ad serving, batch processing, video encoding, and distributed analy9cs.
GPU G2, CG1 Game streaming, 3D applica9on streaming, and other server-‐side graphics workloads (G2). Computa9onal chemistry, rendering, financial modeling, and engineering design (CG1)
Memory-‐op9mized M2, CR1 High performance databases, distributed memory caches, and in-‐memory analy9cs.
Storage-‐op9mized HS1, I2, HI1
NoSQL databases like Cassandra and MongoDB, and scale out transac9onal databases (I2, HI1). Data warehousing, Hadoop, and cluster file systems (HS1).
![Page 16: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/16.jpg)
CPU capacity -‐ ECUs & vCPUs
• ECU – One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-‐1.2 GHz 2007 Opteron or 2007 Xeon processor
• vCPU – The number of virtual CPUs per instance
Type CPU
m1.small Opteron 2218
c1.medium Xeon E5410
m1.large Xeon E5430
m2.xlarge Xeon X5550
c1.xlarge Xeon E5410
![Page 17: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/17.jpg)
EBS – Elas9c Block Store
Root /dev/sda1
“Amazon Elas5c Block Store (Amazon EBS) provides persistent block level storage volumes for use with Amazon EC2 instances in the AWS Cloud.”
EBS /dev/sdb
![Page 18: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/18.jpg)
EBS – Elas9c Block Store
Root /dev/sda1
“Amazon Elas5c Block Store (Amazon EBS) provides persistent block level storage volumes for use with Amazon EC2 instances in the AWS Cloud.”
EBS /dev/sdb
EC2 Instance
![Page 19: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/19.jpg)
EBS – Standard EC2 instance normally communicate with EBS volumes using its network interface, rou9ng Internet traffic and I/O opera9ons
over the single network interface.
EBS /dev/sdb
EC2 Instance
Network Interface
![Page 20: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/20.jpg)
EBS – Op9mized Instances with EBS Op5mized badge receive another network interface, dedicated only to EBS’ traffic, with a fixed throughput
of 500Mbps for m1.large types and 1Gbps for the others.
EBS /dev/sdb
EC2 Instance
![Page 21: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/21.jpg)
![Page 22: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/22.jpg)
Availability Zones
Amazon Web Services
US East (N. Virginia)
us-‐east-‐1b
us-‐east-‐1c us-‐east-‐1d
EU (Ireland)
eu-‐west-‐1a
eu-‐west-‐1b eu-‐west-‐1c
![Page 23: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/23.jpg)
IOPS (input/output opera9ons per second)
• Provisioned IOPS volumes can achieve single digit millisecond latencies and are designed to deliver within 10% of the provisioned IOPS performance 99.9% of the 9me.
• Provisioned IOPS volumes support up to 30 IOPS per GB.
• Enables provisioning 4000 IOPS on a volume as small as 134 GB up to 1 TB.
• As a point of reference, a standard EBS volume will generally provide about 100 IOPS on average.
![Page 24: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/24.jpg)
Elas9c IP Addresses
• Map sta9c IP address to EC2 instance • Limited to 5 per account (can apply for more) • Charged for unallocated IP addresses ($.01/hr) • Reverse DNS records can be configured (requires filling out a form)
![Page 25: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/25.jpg)
Security Groups
• Firewall for EC2 instances • Up to 5 security groups per network interface • Up to 50 rules to a security group • iptables setup on linux boxes with just port 22 open by default.
![Page 26: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/26.jpg)
RDS
• Rela9onal Database Service (RDS) • Provision addi9onal storage on-‐the-‐fly with zero down9me
• Automa9c patches, backs up and replica9on • Mul9-‐AZ – synchronous replica9on and automa9c failover to standby instance
• Read Replicas for read-‐heavy workloads • Store up to 3TB and IOPS up to 30,000
![Page 27: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/27.jpg)
Development Environment
nodeJS
node.js
EC2
Amazon Web Services
22 (ssh) 8080 (hVp)
3306 (mysql)
![Page 28: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/28.jpg)
Produc9on Environment
nodeJSEC2 Elas9c
Load Balancer
S3 Bucket CloudFront
nodeJSEC2
Amazon Web Services
80,443 (hVp,hVps) 8080,22 (hVp,ssh)
3306 (mysql)
![Page 29: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/29.jpg)
Elas9c Load Balancer
• Load balances requests across mul9ple EC2 instance and mul9ple Availability Zones
• Support SSL termina9on • Supports s9cky sessions • Allows for Auto Scaling • Up to 10 per region
![Page 30: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/30.jpg)
Route 53
• Latency Based Rou9ng • Weighted Round Robin • DNS Failover • AWS integra9on (ELB, CloudFront, S3) • 100% SLA • Servers in United States(14), Europe(10), Asia(9), Australia(1), South America(2)
DNS service
![Page 31: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/31.jpg)
Route 53
![Page 32: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/32.jpg)
S3
• 99.999999999% durability, with 99.99% availability
• File size can range between 1 byte to 5 terabytes, number of files is unlimited
• HTTP & BitTorrent protocols, REST & SOAP API
Simple Storage Service
Reduced Redundancy Storage (RRS) & Amazon Glacier
![Page 33: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/33.jpg)
CloudFront
• Custom SSL support • Private Content • Geo Restric9ons • Custom Error Responses • Live Streaming
Content Delivery Network (CDN)
![Page 34: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/34.jpg)
CloudFront
0
500
1000
1500
2000
2500
Padova, Italy London, United Kingdom
Stockholm, Sweden
New York, U.S.A.
Cologne, Germany
Munchen, Germany
Hong Kong, China
San Francisco, U.S.A.
Zurich, Switzerland
Groningen, Netherlands
S3
CloudFront millise
cond
s
8.7KB JavaScript file download
![Page 35: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/35.jpg)
CloudForma9on
• Template for crea9ng a Stack that includes AWS resources
• Ability to update or delete en9re Stack • Automa9c rollback on failures • CloudFormer for crea9ng Stack from exis9ng resources
![Page 36: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/36.jpg)
CloudForma9on
Amazon Web Services
nodeJS
nodeJS
QA
![Page 37: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/37.jpg)
CloudForma9on
Amazon Web Services
nodeJS
nodeJS
QA
nodeJS
nodeJS
nodeJS
nodeJS
Staging Produc9on
![Page 38: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/38.jpg)
What is all this going to cost?
• Many factors go into cost… – Region (Virginia, California, Ireland,…) – AMI License (Linux, RHEL, SUSE,Ubuntu,…) – Type (m1.small, m3.medium,c3.large,…) – EBS ( size(GB), Standard/Op9mized, IOPS,…) – Monitoring (CloudWatch) – Tenancy (Shared/Dedicated) – Data Transfer (IN/OUT)
![Page 39: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/39.jpg)
![Page 40: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/40.jpg)
AWS Simple Monthly Calculator
![Page 41: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/41.jpg)
EC2 Purchase Op9ons
• On-‐Demand – Pay as you go at hourly rate – Nothing up front, no commitment
• Reserved – 1-‐3 year commitment – One-‐9me upfront payment, reduced hourly rate
• Spot – Bid for hourly rate as becomes available
![Page 42: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/42.jpg)
Reserved Instances -‐ U9liza9on
* Rates are compared for an m1.xlarge instance 3-‐year Reserved Instance, % savings on effec9ve hourly rates are roughly the same for all instance types
![Page 43: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/43.jpg)
Heavy U9liza9on Pricing
![Page 44: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/44.jpg)
DIY vs On-‐Demand vs Reserved
![Page 45: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/45.jpg)
References & Resources • En9re AWS Web Site -‐ hVp://aws.amazon.com/ • EC2 and EBS Performance -‐
hVp://www.slideshare.net/AmazonWebServices/stg302-‐28617072 • ECU CPU Benchmarking -‐ hVp://blog.cloudharmony.com/2010/05/
what-‐is-‐ecu-‐cpu-‐benchmarking-‐in-‐cloud.html • Route 53 speed comparison -‐
hVp://www.dnscomparison.com/route53.html • CloudVer9cal cost cheat sheet -‐ hVps://blog.copper.io/aws-‐cost-‐
cheat-‐sheet-‐2/ • Simple Monthly Calculator -‐
hVp://calculator.s3.amazonaws.com/index.html • How AWS Pricing Works -‐
hVp://d36cz9buwru1V.cloudfront.net/AWS_Pricing_Overiew.pdf • Beer Survey App -‐ hVp://www.beersurvey.org
![Page 46: Devnexus slides - Amazon Web Services](https://reader034.fdocuments.us/reader034/viewer/2022042713/54557092af7959755d8b4879/html5/thumbnails/46.jpg)
Q&A or
Go drinks some beer?