Amazon	
  Web	
  Services	
  
Going	
  from	
  development	
  to	
  produc9on	
  
Introduc9on	
  
Tom	
  Elrod	
  –	
  CTO	
  @	
  Make	
  &	
  Build	
  
	
  
	
  
	
  
	
  
	
  
We	
  build	
  cool	
  st...
Narrowing	
  the	
  field	
  
EC2	
  

RDS	
  

Elas-c	
  Load	
  Balancer	
  

S3	
  Bucket	
  

Route	
  53	
  

CloudFro...
Beer	
  Survey	
  
Web	
  Applica9on	
  
Beer	
  Survey	
  –	
  Tech	
  Stack	
  

Presenta9on	
  

Bootstrap	
  

Business	
  Logic	
  

Node.js	
  

Persistence	...
Beer	
  Survey	
  –	
  Architecture	
  
Client	
  	
  
(browser)	
  

Bootstrap	
  

Angular	
  
REST	
  

Server	
  

Nod...
Development	
  Environment	
  
Amazon	
  	
  
Web	
  Services	
  
nodeJS

EC2	
  

node.js	
  

Web	
  Browser	
  
Development	
  Environment	
  
Amazon	
  	
  
Web	
  Services	
  
nodeJS

22	
  (ssh)	
  
8080	
  (hVp)	
  

EC2	
  

node...
Produc9on	
  Environment	
  
Amazon	
  Web	
  Services	
  
CloudFront	
  

Elas9c	
  
Load	
  Balancer	
  

S3	
  Bucket	
...
Produc9on	
  Environment	
  
Amazon	
  Web	
  Services	
  
CloudFront	
  

S3	
  Bucket	
  

8080,22	
  (hVp,ssh)	
  
80,4...
EC2	
  
Virtual	
  servers	
  that	
  can	
  run	
  applica9ons	
  
Provision	
  new	
  server	
  instances	
  in	
  minut...
Regions	
  

US	
  East	
  (N.	
  Virginia)	
  $	
  

Asia	
  Pacific	
  (Singapore)	
  $$$	
  

US	
  West	
  (Oregon)	
  ...
Instant	
  Type	
  Families	
  
Family	
  

Types	
  

Popular	
  Use	
  cases	
  

General	
  Purpose	
  

M1,	
  M3	
  
...
CPU	
  capacity	
  -­‐	
  ECUs	
  &	
  vCPUs	
  
Type	
  

CPU	
  

m1.small	
  

Opteron	
  2218	
  

c1.medium	
  

Xeon...
EBS	
  –	
  Elas9c	
  Block	
  Store	
  
“Amazon	
  Elas5c	
  Block	
  Store	
  (Amazon	
  EBS)	
  provides	
  persistent	...
EBS	
  –	
  Elas9c	
  Block	
  Store	
  
“Amazon	
  Elas5c	
  Block	
  Store	
  (Amazon	
  EBS)	
  provides	
  persistent	...
EBS	
  –	
  Standard	
  
EC2	
  instance	
  normally	
  communicate	
  with	
  EBS	
  volumes	
  using	
  its	
  
network	...
EBS	
  –	
  Op9mized	
  
Instances	
  with	
  EBS	
  Op5mized	
  badge	
  receive	
  another	
  network	
  
interface,	
  ...
Availability	
  Zones	
  
Amazon	
  Web	
  Services	
  
US	
  East	
  (N.	
  Virginia)	
  

EU	
  (Ireland)	
  

us-­‐east...
IOPS	
  

(input/output	
  opera9ons	
  per	
  second)	
  
•  Provisioned	
  IOPS	
  volumes	
  can	
  achieve	
  single	
...
Elas9c	
  IP	
  Addresses	
  
• 
• 
• 
• 

Map	
  sta9c	
  IP	
  address	
  to	
  EC2	
  instance	
  
Limited	
  to	
  5	
...
Security	
  Groups	
  
• 
• 
• 
• 

Firewall	
  for	
  EC2	
  instances	
  
Up	
  to	
  5	
  security	
  groups	
  per	
  ...
RDS	
  
•  Rela9onal	
  Database	
  Service	
  (RDS)	
  
•  Provision	
  addi9onal	
  storage	
  on-­‐the-­‐fly	
  with	
  ...
Development	
  Environment	
  
Amazon	
  	
  
Web	
  Services	
  
nodeJS

22	
  (ssh)	
  
8080	
  (hVp)	
  

EC2	
  

node...
Produc9on	
  Environment	
  
Amazon	
  Web	
  Services	
  
CloudFront	
  

S3	
  Bucket	
  

8080,22	
  (hVp,ssh)	
  
80,4...
Elas9c	
  Load	
  Balancer	
  
•  Load	
  balances	
  requests	
  across	
  mul9ple	
  EC2	
  
instance	
  and	
  mul9ple	...
Route	
  53	
  
DNS	
  service	
  
• 
• 
• 
• 
• 
• 

Latency	
  Based	
  Rou9ng	
  
Weighted	
  Round	
  Robin	
  
DNS	
 ...
Route	
  53	
  
S3	
  
Simple	
  Storage	
  Service	
  
•  99.999999999%	
  durability,	
  with	
  99.99%	
  
availability	
  
•  File	
  ...
CloudFront	
  
Content	
  Delivery	
  Network	
  (CDN)	
  
• 
• 
• 
• 
• 

Custom	
  SSL	
  support	
  
Private	
  Content...
CloudFront	
  
8.7KB	
  JavaScript	
  file	
  download	
  
2500	
  

milliseconds	
  

2000	
  

1500	
  

S3	
  
CloudFron...
CloudForma9on	
  
•  Template	
  for	
  crea9ng	
  a	
  Stack	
  that	
  includes	
  
AWS	
  resources	
  
•  Ability	
  t...
CloudForma9on	
  
Amazon	
  Web	
  
Services	
  
QA	
  

nodeJS

nodeJS
CloudForma9on	
  
Amazon	
  Web	
  
Services	
  
QA	
  

nodeJS

nodeJS

Staging	
  

nodeJS

nodeJS

Produc9on	
  

nodeJ...
What	
  is	
  all	
  this	
  going	
  to	
  cost?	
  
•  Many	
  factors	
  go	
  into	
  cost…	
  
–  Region	
  (Virginia...
AWS	
  Simple	
  Monthly	
  Calculator	
  
EC2	
  Purchase	
  Op9ons	
  
•  On-­‐Demand	
  
–  Pay	
  as	
  you	
  go	
  at	
  hourly	
  rate	
  
–  Nothing	
  up	
 ...
Reserved	
  Instances	
  -­‐	
  U9liza9on	
  

*	
  Rates	
  are	
  compared	
  for	
  an	
  m1.xlarge	
  instance	
  3-­‐...
Heavy	
  U9liza9on	
  Pricing	
  
DIY	
  vs	
  On-­‐Demand	
  vs	
  Reserved	
  
References	
  &	
  Resources	
  
•  En9re	
  AWS	
  Web	
  Site	
  -­‐	
  hVp://aws.amazon.com/	
  
•  EC2	
  and	
  EBS	
...
Q&A	
  
or	
  

	
  

Go	
  drinks	
  some	
  beer?
Devnexus slides - Amazon Web Services
Devnexus slides - Amazon Web Services
Devnexus slides - Amazon Web Services
Devnexus slides - Amazon Web Services
Upcoming SlideShare
Loading in …5
×

Devnexus slides - Amazon Web Services

469 views

Published on

Going from development to production with Amazon Web Services.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
469
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Devnexus slides - Amazon Web Services

  1. 1. Amazon  Web  Services   Going  from  development  to  produc9on  
  2. 2. Introduc9on   Tom  Elrod  –  CTO  @  Make  &  Build             We  build  cool  stuff  
  3. 3. Narrowing  the  field   EC2   RDS   Elas-c  Load  Balancer   S3  Bucket   Route  53   CloudFront   CloudForma-on  
  4. 4. Beer  Survey   Web  Applica9on  
  5. 5. Beer  Survey  –  Tech  Stack   Presenta9on   Bootstrap   Business  Logic   Node.js   Persistence   MySQL   Angular  
  6. 6. Beer  Survey  –  Architecture   Client     (browser)   Bootstrap   Angular   REST   Server   Node.js   SQL   Database   MySQL  
  7. 7. Development  Environment   Amazon     Web  Services   nodeJS EC2   node.js   Web  Browser  
  8. 8. Development  Environment   Amazon     Web  Services   nodeJS 22  (ssh)   8080  (hVp)   EC2   node.js   3306  (mysql)  
  9. 9. Produc9on  Environment   Amazon  Web  Services   CloudFront   Elas9c   Load  Balancer   S3  Bucket   nodeJS EC2   nodeJS EC2   Web  Browser  
  10. 10. Produc9on  Environment   Amazon  Web  Services   CloudFront   S3  Bucket   8080,22  (hVp,ssh)   80,443  (hVp,hVps)   Elas9c   Load  Balancer   nodeJS EC2   nodeJS EC2   3306  (mysql)  
  11. 11. 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   •  •  •  • 
  12. 12. 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)  $$  
  13. 13. 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   Game  streaming,  3D  applica9on  streaming,  and   other  server-­‐side  graphics  workloads  (G2).   Computa9onal  chemistry,  rendering,  financial   modeling,  and  engineering  design  (CG1)   G2,  CG1   Memory-­‐op9mized   M2,  CR1   High  performance  databases,  distributed  memory   caches,  and  in-­‐memory  analy9cs.   Storage-­‐op9mized   NoSQL  databases  like  Cassandra  and  MongoDB,   and  scale  out  transac9onal  databases  (I2,  HI1).   Data  warehousing,  Hadoop,  and  cluster  file   systems  (HS1).   HS1,  I2,   HI1  
  14. 14. CPU  capacity  -­‐  ECUs  &  vCPUs   Type   CPU   m1.small   Opteron  2218   c1.medium   Xeon  E5410   m1.large   Xeon  E5430   m2.xlarge   Xeon  X5550   c1.xlarge   Xeon  E5410   •  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  
  15. 15. EBS  –  Elas9c  Block  Store   “Amazon  Elas5c  Block  Store  (Amazon  EBS)  provides  persistent   block  level  storage  volumes  for  use  with  Amazon  EC2  instances  in   the  AWS  Cloud.”   Root   /dev/sda1   EBS   /dev/sdb  
  16. 16. EBS  –  Elas9c  Block  Store   “Amazon  Elas5c  Block  Store  (Amazon  EBS)  provides  persistent   block  level  storage  volumes  for  use  with  Amazon  EC2  instances  in   the  AWS  Cloud.”   Root   /dev/sda1   EC2   Instance   EBS   /dev/sdb  
  17. 17. 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.   EC2   Instance   Network   Interface   EBS   /dev/sdb  
  18. 18. 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   EC2   Instance   /dev/sdb  
  19. 19. Availability  Zones   Amazon  Web  Services   US  East  (N.  Virginia)   EU  (Ireland)   us-­‐east-­‐1b   eu-­‐west-­‐1a   us-­‐east-­‐1c   us-­‐east-­‐1d   eu-­‐west-­‐1b   eu-­‐west-­‐1c  
  20. 20. 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.  
  21. 21. 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)  
  22. 22. 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.  
  23. 23. 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  
  24. 24. Development  Environment   Amazon     Web  Services   nodeJS 22  (ssh)   8080  (hVp)   EC2   node.js   3306  (mysql)  
  25. 25. Produc9on  Environment   Amazon  Web  Services   CloudFront   S3  Bucket   8080,22  (hVp,ssh)   80,443  (hVp,hVps)   Elas9c   Load  Balancer   nodeJS EC2   nodeJS EC2   3306  (mysql)  
  26. 26. 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  
  27. 27. Route  53   DNS  service   •  •  •  •  •  •  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)    
  28. 28. Route  53  
  29. 29. S3   Simple  Storage  Service   •  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   Reduced  Redundancy  Storage  (RRS)  &  Amazon  Glacier  
  30. 30. CloudFront   Content  Delivery  Network  (CDN)   •  •  •  •  •  Custom  SSL  support   Private  Content   Geo  Restric9ons   Custom  Error  Responses   Live  Streaming  
  31. 31. CloudFront   8.7KB  JavaScript  file  download   2500   milliseconds   2000   1500   S3   CloudFront   1000   500   0   Padova,  Italy   London,   Stockholm,   New  York,   United   Sweden   U.S.A.   Kingdom   Cologne,   Germany   Munchen,   Hong  Kong,   San   Zurich,   Groningen,   Germany   China   Francisco,   Switzerland   Netherlands   U.S.A.  
  32. 32. 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  
  33. 33. CloudForma9on   Amazon  Web   Services   QA   nodeJS nodeJS
  34. 34. CloudForma9on   Amazon  Web   Services   QA   nodeJS nodeJS Staging   nodeJS nodeJS Produc9on   nodeJS nodeJS
  35. 35. 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)  
  36. 36. AWS  Simple  Monthly  Calculator  
  37. 37. 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    
  38. 38. 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  
  39. 39. Heavy  U9liza9on  Pricing  
  40. 40. DIY  vs  On-­‐Demand  vs  Reserved  
  41. 41. 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  
  42. 42. Q&A   or     Go  drinks  some  beer?

×