Learn from AWS 2

1,082 views

Published on

Published in: Technology, Sports
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,082
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
24
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • system
  • Besides miracle
  • dedicated
  • Zynga 12,000 EC2, 10M/day, $ 50M/month Playfish 100+EC2, 10M/day $400M, 200manreddit: 200+EC2Myspace: 800 EC2 m1.large -> 1M users, 77,000hps
  • Ami id, owner, visibility, product code, Arch, Name, Platform:Root device:Virtualization: Hardware Virtual Machine (HVM)
  • Bucket and object1B ~ 5TB, unique urlRESTACLMulti-upload, range getMulti-regionVersioning, rrs
  • Network transfer fee is aggregated throughout all services(except cloudfront)
  • ecosystem
  • Everyone can make for live
  • Cloud admin start!
  • 2011-Apr-20
  • Learn from AWS 2

    1. 1. 向成功的雲服務學習Amazon Web Services Hank Lin
    2. 2. Hank Lin@hanklinhttp://hanklin.com/hank9x@gmail.com
    3. 3. My AWS Book ;) • ISBN:9789861992792
    4. 4. TopicsAmazon如何滿足網路startupAmazon與其它廠的競合關係
    5. 5. You Call This Cloud?http://www.flickr.com/photos/lennysan/4403695791/
    6. 6. I Say This Is CloudPhoto by Pierre J. (French Army, July 3, 1970)
    7. 7. Everything Is a ServiceSoftware as a ServicePlatform as a ServiceInfrastructure as a Service * as a Service
    8. 8. Nothing Newhttp://en.wikipedia.org/wiki/File:The_Earth_seen_from_Apollo_17.jpg
    9. 9. Nothing NewInternetVirtualization, VPSPlatformASPBrowser, RIANoSQLScaling Out/Up
    10. 10. Everything Changeshttp://en.wikipedia.org/wiki/File:Giantimpact.gif
    11. 11. Everything ChangesAPIsOn-DemandPay As You GoInfinite CapacityLease Instead Of ProvisionReallocate Instead Of RecoverScaling In/Down
    12. 12. Customer-centricAgile Development2 weeks ~ 1 month iterationWhat customers want
    13. 13. Developer-centricEat your own dog foodAPIsAsync. & BatchingStart from simple
    14. 14. Guns, Lots of Guns(a picture was here)
    15. 15. AWS Productshttp://www.flickr.com/photos/dunechaser/4785103816/
    16. 16. AWS ProductsFunction ProductsCompute EC2、EMR、Auto ScalingStorage S3、EBS、AWS Import/Export、Public DatasetDatabase SimpleDB、RDSMessaging SNS、SQS、SESCDN CloudFrontNetworking Route 53、VPC、ELBMonitoring CloudWatchDeployment Elastic Beanstalk、CloudFormationPayments FPS、DevPaySupport Premium SupportE-Commerce FWS、Mechanical TurkWeb Traffic Alexa Top Sites、Alexa Web Information Service
    17. 17. EC2http://opencompute.org/
    18. 18. Large InstanceLaunchdifferent High-CPUinstance Extra Largetypes Instance Template High-Memory (AMI) Double Extra Large Instance
    19. 19. 32-bitType CPU RAM Storage Arch. IO NameSmall 1 ECU 1.7 GB 150 GB 32-bit Moderate m1.smallMicro Max 2 613 MB EBS only 32-bit or Low t1.micro ECUs 64-bitHigh-CPU 5 ECUs 1.7 GB 340 GB 32-bit Moderate c1.mediumMedium *EC2 Compute Unit (ECU) – equivalent of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.
    20. 20. 64-bitType CPU RAM Storage Arch. IO NameLarge 4 ECUs 7.5 GB 840 GB 64-bit High m1.largeExtra Large 8 ECUs 15 GB 1680 GB 64-bit High m1.xlargeHigh-CPU Extra 20 ECUs 7 GB 1680 GB 64-bit High c1.xlargeLargeHigh-Memory 6.5 ECUs 17.1 GB 420 GB 64-bit Moderate m2.xlargeExtra LargeHigh-Memory 13 ECUs 34.2 GB 840 GB 64-bit High m2.2xlargeDouble ExtraLargeHigh-Memory 26 ECUs 68.4 GB 1680 GB 64-bit High m2.4xlargeQuadruple ExtraLarge
    21. 21. High Performance ComputingType Processor RAM Storage Arch. IO NameCluster 33.5 ECUs 23 GB 1680 GB 64-bit Very high cc1.4xlargeCompute (2 Intel Xeon (10 GbpsQuadruple X5570, quad-core Ethernet)Extra Nehalem)LargeCluster 33.5 ECUs 22 +1 GB 1680 GB 64-bit Very high cg1.4xlargeGPU (2 Intel Xeon 2 x 3 GB (on (10 GbpsQuadruple X5570, quad-core GPU ECC) Ethernet)Extra Nehalem),Large 2 NVIDIA Tesla M2050 Fermi GPUs *Tesla Fermi M2050 contains 448 cores and 3 GB of ECC RAM and are designed to deliver up to 515 gigaflops
    22. 22. NASA JPLProcessing 3.2 Giga-pixel Images In 2 Hours, 30Instances. Improved an order of magnitude. MATLAB team at MathWorks20 Gigaflops -> 1.3 Teraflops
    23. 23. Regions &Availability Zones
    24. 24. 就算殺了一個我,還有千千萬萬個我(a picture was here)
    25. 25. (a picture of Agent Smiths was here)
    26. 26. PricingTypeRegionOSOn-Demand/Reserved/Spot/TenancyPaid AMIInstance-hoursEBS volumes/snapshots
    27. 27. Elasticity & AgilityEBSEIPVPCEMRELBAuto ScalingCloudWatchBeanstalk
    28. 28. EC2 CustomersZyngaPlayfishRedditMyspaceNetflixJustin.tvAnimotoHeroku
    29. 29. break;
    30. 30. EC2
    31. 31. InstanceAttach EBS volume Instance EBS volume Create snapshot EBS snapshot in Amazon S3
    32. 32. Instance A Instance B AttachDetach EBS volume Same EBS volume Instance C Attach New EBS volume Create volume EBS snapshot in Amazon S3
    33. 33. Amazon EC2 Security Group Firewall Open 80,443 to internet Open 22 to corporate network WebAuthorize Serversaccessfrom appservergroup Open 22 to corporate network App ServersAuthorizeaccessfrom DBserver All other traffic deniedgroup DB Servers
    34. 34. S3Save a picture OKSave a DVD disc OKSave a Bluray disc OK
    35. 35. PricingStorage us-east, eu-west, ap-se us-west ap-ne Standard RRS Standard RRS Standard RRSFirst 1 TB $0.140 $0.093 $0.154 $0.103 $0.150 $0.1001~ 50 TB $0.125 $0.083 $0.139 $0.093 $0.135 $0.09050 ~ 500 $0.110 $0.073 $0.124 $0.083 $0.120 $0.080TB500 ~ 1000 $0.095 $0.063 $0.109 $0.073 $0.105 $0.070TB1000 ~ $0.080 $0.053 $0.095 $0.063 $0.090 $0.0605000 TB5000+ TB $0.055 $0.037 $0.070 $0.047 $0.065 $0.044 * Prices are calculated per GB ** Requests and Bandwidth also incur charges
    36. 36. Simple & ReliableBuckets & ObjectsCapacity : ∞High Scalability, Availability, DurabilityREST/SOAP/BTACL/metadata/RRSEncryptionIntegrate with other AWS services
    37. 37. S3 CustomersAmazonDropboxTwitterSmugmugYelpUbuntu OneZmandaTumblr
    38. 38. DistinctionAmazon.com’s ExperiencesReal Developers’ NeedsFull IaaS ProductsEnormous Developer Tools/Libraries
    39. 39. AWS EcosystemEnd UsersWeb Sites/StartupsISVsSystem Integrators
    40. 40. 人人有功練(a picture was here)
    41. 41. OSRed Hat Enterprise LinuxSUSE Linux EnterpriseFedoraWindows ServerAmazon Linux AMIGentoo LinuxOracle Enterprise LinuxUbuntu LinuxDebian
    42. 42. IBM DB2IBM Informix Dynamic ServerIBM Lotus Web Content ManagementIBM WebSphere Portal ServerIBM WebSphere Application ServerIBM sMash
    43. 43. Microsoft SQL Server StandardMicrosoft IIS/ASP.NETWindows Media ServerMySQL EnterpriseOracle Database 11gJboss Enterprise Application PlatformWowza Media Server ProSmartFoxStackIQ Rocks+
    44. 44. Demo
    45. 45. Alestic AMIs
    46. 46. EC2 Instance Initializationmbp:~ hank$ ec2-run-instances ami-7c423c2e -k sg-web-t m1.small -g www -z ap-southeast-1a...... i-fd1fd5a8 ami-7c423c2e pending sg-web0......mbp:~ hank$ ec2-describe-instances i-fd1fd5a8...... i-fd1fd5a8 ami-7c423c2e ec2-122-248-220-243.ap-southeast-1.compute.amazonaws.com ......mbp:~ hank$ ssh -i sg-web.pem ubuntu@122.248.220.243[ubuntu@ip-10-130-93-73 ~]$ sudo apt-get -y update&& apt-get -y install apache2 php5 php5-curl
    47. 47. EC2 Instance Initializationmbp:~ hank$ ec2-run-instances ami-7c423c2e -k sg-web-t m1.small -g www -z ap-southeast-1a...... i-fd1fd5a8 ami-7c423c2e pending sg-web0...... LAME! I Want Automaticmbp:~ hank$ ec2-describe-instances i-fd1fd5a8 Initialization...... i-fd1fd5a8 ami-7c423c2e ec2-122-248-220-243.ap-southeast-1.compute.amazonaws.com ......mbp:~ hank$ ssh -i sg-web.pem ubuntu@122.248.220.243[ubuntu@ip-10-130-93-73 ~]$ sudo apt-get -y update&& apt-get -y install apache2 php5 php5-curl
    48. 48. EC2 Instance Initialization#!/usr/bin/env bashset -exsudo apt-get -y updatesudo apt-get -y install apache2 php5 php5-curl# install AWS SDK# install application code# get public-ipv4 from EC2 instance metadatapublic_ipv4 = $(wget -qO-169.254.169.254/latest/meta-data/public-ipv4)# do something useful with $public_ipv4# more initializations ..."init-web.sh"
    49. 49. EC2 Instance Initializationmbp:~ hank$ ec2-run-instances ami-7c423c2e -k sg-web -tm1.small -g www -z ap-southeast-1a -f init-web.sh...... i-c10fc594 ami-7c423c2e pending sg-web 0......mbp:~ hank$ ec2-describe-instances i-c10fc594...... i-c10fc594 ami-7c423c2e ec2-122-248-221-187.ap-southeast-1.compute.amazonaws.com ......mbp:~ hank$ curl 122.248.221.187<!doctype html><html><head><meta http-equiv="content-type"content="text/html; charset=UTF-8"><title>My Killer App</title>......
    50. 50. I Need More Computing Power, And I Need It NOWmbp:~ hank$ ec2-run-instances ami-12423c40 -ksg-web -t c1.xlarge -g www -z ap-southeast-1a -f init-web.sh -n 10...... i-320c424e ami-12423c40 pending sg-web 0............ i-5a2c2519 ami-12423c40 pending sg-web 1......
    51. 51. More WorkScheduled Back UpMonitor And AlertNotify LB, Controller, etcFailoverMulti-AZ, Multi-RegionAutomatically Scale In/OutCeil, Floor, Cool down
    52. 52. AWS Judgment Day
    53. 53. When The Sky Is Falling
    54. 54. AWS Free Usage TierProduct Quota (for new users, expired in 1 year)EC2 750 instance-hours. (t1.micro, Linux)EBS 10GB , 1M I/Os. (snapshot: 10GB , 10K GETs, 1K PUTs)ELB 750 LoadBalancer-hours, 15GB data processingS3 5GB standard storage, 20K GETs, 2K PUTsNetwork 15GB in and 15GB out. (except CloudFront)Product Quota (for new users, expired in 1 year)EC2 750 instance-hours. (t1.micro, Linux)EBS 10GB , 1M I/Os. (snapshot: 10GB , 10K GETs, 1K PUTs)ELB 750 LoadBalancer-hours, 15GB data processingS3 5GB standard storage, 20K GETs, 2K PUTsNetwork 15GB in and 15GB out. (except CloudFront) * Quota are calculated per month
    55. 55. If I have seen further it is by standing on the shoulders of giantshttp://en.wikipedia.org/wiki/File:Orion_aveugle_cherchant_le_soleil.jpg
    56. 56. Thank you(a picture was here)

    ×