elb & cloudwatch & autoscaling - awsマイスターシリーズ

Download ELB & CloudWatch & AutoScaling - AWSマイスターシリーズ

Post on 31-May-2015

10.041 views

Category:

Technology

3 download

Embed Size (px)

TRANSCRIPT

  • 1. AWS ReloadedELB, AutoScaling & CloudWatch2012521 @KenTamagawa /2012521 v.1.0

2. ELBCloudWatchAuto Scaling: WebEC2)ELBCloudWatchAuto Scaling()EC2Elastic Load BalancingEC2EC2 ABCPUAuto Scaling CloudWatch 3. S3CloudFront()EC2/ELB!! 4. Agenda ELB & TIPS/ AutoScaling CloudWatch 5. ELB: Elastic Load Balancing AWS ELB : EC2(AZ: ) : ELB /AZ : ELB : EC2 : 6. ELB HTTP / HTTPS / TCP / SSLHTTP / HTTPS /ELB TCP / SSLWeb EC2 EC2AB 7. ELB HTTPHTTPSSSLTCP ELBIP () ELBDNS: hanako-12345678.ap-northeast-1.elb.amazonaws.com CNAME AWS(Web)API SDKELB 8. ELB AWSELB ELB EC2 ELB 9. : ELB 10. ELBEC2 () 11. index.html 12. EC2 EC2 13. 14. ELB 15. : EC2ELBamazon-elb/amazon-elb-sg 16. Agenda ELB & TIPS/ AutoScaling CloudWatch 17. ELB ELBSSL Zone Apex Session Stickiness VPCELB IPv4IPv6 () ELBDNSIP 18. ELBSSL ELBSSL Termination ELBSSL Termination ELBSSL Termination SSLTCP SSLELB /Web/IAMAPI Cipher() 19. ELBSSL SSL ELBSSL Termination ELBSSL Termination SSLTCP 20. ELBSSL SSL SSL / 21. Cipher 22. 23. SSLCipher http://aws.typepad.com/aws_japan/2012/05/elastic-load-balancer-console-updates-and-ipv6-support-for-2-additional-regions.html 24. Zone Apex Zone Apex()DNSCNAME ) example.com www.example.com-> hanako-12345678.ap-northeast-1.elb.amazonaws.com Route 53-> Route 53Aliashttp://docs.amazonwebservices.com/Route53/latest/DeveloperGuide/index.html?CreatingAliasRRSets.html 25. Session Stickiness Session Stickiness() ELBcookie / applicationcookie 26. () Amazon VPC AWS VPNAWS AWS 20118Copyright 2012 Amazon Web Services 26 27. AWS EC2 VPN EC2 VPC NAT Copyright 2012 Amazon Web Services 28. VPCELBELB on VPC ELB ELB ELBELB on VPC IPv6 Dedicated /25 CIDRIP ELBAutoBalancing 29. IPv4IPv6 ()ELB3DNS 30. ELBDNSIP DNSIP AZ2IP(8) 31. IAMAPIX-Forwarded X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Port, X-Forwarded-Server, X-Forwarded-Host X-Forwarded-ForIP (AZ)CloudWatch (HTTP 2xx-5xx) EC2 CloudWatch 32. Agenda ELB & TIPS/ AutoScaling CloudWatch 33. ELBTIPS ELBIP(A) IPCNAME AZ ELBAZ ELB() ELB AZ AZ 34. ELBTIPS HTTP200 : Apache httpd: Satisfy Any Allow from all 35. ELBTIPS Web Web AppDB () CDPDeep Health Check http://aws.clouddesignpattern.org/ 36. ELBTIPS ELB ELB ELB ELB / 52 37. ELBTIPS DNSTTL(60 )DNSELB60IP / 38. ELBTIPS SSL1ELBEC2/ ELBTCP60Terminate60 ELB Best Practices in Evaluating Elastic Load Balancing http://aws.amazon.com/articles/1636185810492479 : http://understeer.hatenablog.com/entry/2012/02/29/175334 39. ELBUDPURLSession AffinitycookieURLSSLIDELBEIPELBELBAPI) ELB1EC2HTTPS(SSL) - suz-lab http://blog.suz-lab.com/2011/01/elb1ec2httpsssl.htmlELB 10ELB http://aws.amazon.com/jp/contact- us/#request_service_limitation 40. Agenda ELB & TIPS/ AutoScaling CloudWatch 41. Elastic Load Balancing EC2EC2 ABCPUAuto Scaling CloudWatch 42. AWS(CDP)Scale Outhttp://aws.clouddesignpattern.org 43. AS: AutoScaling EC2 : : ELB: ELBEC2 /API - CloudWatch 44. AS: AutoScaling Auto Scaling : SNS : EC2 AutoScaling AWS API(AWS Elastic Beanstalk) 45. Auto Scaling Launch: Terminate: HealthCheck: ReplaceUnhealthy: AddToLoadBalancer: ELB AZRebalance: AZ AlarmNotification: / ScheduledActions: 46. Auto Scaling as-cmd : http://aws.amazon.com/developertools/Amazon-EC2/2535 47. Auto Scaling3 Launch Configuration AMI? Auto Scaling Group Auto Scaling ELBAZMin/MaxLaunch Config Scaling Policy 48. Launch Configuration : AMI, , , ID, Ramdisk ID AMI as-create-launch-config 49. Auto Scaling Group Auto Scaling Launch Configuration Minimum/Maximum/Desired() () (ELB) ELBELB (Grace period) (VPC) as-create-auto-scaling-group 50. Auto Scaling 2 ELB EC2AMI (: Apache) Auto Scaling Launch ConfigurationAMI Auto Scaling Group EC2 Desired capacity : 51. : Auto Scalingas-create-launch-config MyLC --image-id ami-fa9a2efb --instance-type t1.micro --group "webapps" --key tokyo --region ap-northeast-1 52. : Auto Scalingas-create-auto-scaling-group MyAutoScalingGroup --launch-configuration MyLC --availability-zones=ap-northeast-1a, ap-northeast-1b --load-balancers MyLoadBalancer --max-size 1 --min-size 1 --region ap-northeast-1(1a,1b) 53. : Auto Scalingas-describe-auto-scaling-groups MyAutoScalingGroup --headers --regionap-northeast-1 EC2 54. : Auto Scalingmin-size EC2 EC2 55. : Auto Scaling as-update-auto-scaling-group MyAutoScalingGroup --min-size 0 --region ap- northeast-1 as-delete-auto-scaling-group MyAutoScalingGroup --region ap-northeast-1 as-delete-launch-config MyLC --region ap- northeast-1 56. Auto Scaling Policy CloudWatch : / / as-put-scaling-policy 57. : Auto Scalingas-put-scaling-policy MyScaleUpPolicy --auto-scaling-group MyAutoScalingGroup --adjustment=1 --typeChangeInCapacity --cooldown 300 --region ap-northeast-1 58. Auto Scaling PutScheduledUpdateGroupAction AutoScalingGroupNameStartTimeDesiredCapacityMaxSizeMinSize http://docs.amazonwebservices.com/AutoScali ng/latest/APIReference/index.html?API_PutSc heduledUpdateGroupAction.html CDP Scheduled Auto Scaling Scheduled Scale Out 59. Auto ScalingTIPS (ELB) (20) as-describe-scaling-activities as-describe-scaling-activities 60. Auto ScalingTIPS() ELBAZAuto ScalingAZ Auto ScalingEC2Terminate Terminate terminate 61. Auto Scaling Auto Scaling 100 Launch Configurations 20 Auto Scaling Groups 125 Actions 50 Policies 20 SNS Topics / 62. Agenda ELB & TIPS/ AutoScaling CloudWatch 63. Elastic Load Balancing EC2EC2 ABCPUAuto Scaling CloudWatch 64. CloudWatch AWSWeb CloudWatch EC2EBS ELBRDSSNSSQSEMRElastiCacheDynamoDBStorageGateway 2 Auto Scaling PolicySNS 65. CloudWatch GUIAPI CloudWatch ELBRDS1 EC25(1) API 10 http://aws.amazon.com/jp/cloudwatch/ 66. EC2CloudWatch EC2 1~2 (1) 67. Graph 68. CloudWatch 69. 70. EC2 EBS ELB RDS SNS SQS DynamoSGEMR 71. Using CloudWatch API Tools 72. CloudWatch Auto Scaling (Auto Scaling) CloudWatchAlarm SNS AlarmAuto Scaling 73. CloudWatch: Alarm 74. CloudWatch: Alarm 75. CloudWatch: Alarm 76. CloudWatch: AlarmAlarmAuto Scaling 77. CloudWatch: AlarmAlarmSNS 78. mon-put-data PutMetricDataAPI mon-list-metrics 8KB - HTTP GET40KB for - HTTP POST 79. Agenda ELB & TIPS/ AutoScaling CloudWatch 80. AWS(CDP)Scale Outhttp://aws.clouddesignpattern.org 81. ELB ELB1 + EC2 101TB Elastic Load Balancing 30ELB = $18 1000GBELB= $8.00 ($0.008/GB) ()CloudWatch 10 x 30 = $36.75http://calculator.s3.amazonaws.com/calc5.html?lng=ja_JP2011 Amazon Web Services May not be reused or redistributed without permission 82. ()AWSSNS(/) Confirm US EastAlarm 2011 Amazon Web Services May not be reused or redistributed without permission 83. ()$4002011 Amazon Web Services May not be reused or redistributed without permission 84. AWS aws.amazon.com/jp/premiumsupport/ 24/365 TEL AWSAWS$0~$10K: 10%AWS 10%$495%$10K~$80K: 7%$80K~: 5% $15K $400Copyright 2011 Amazon Web Services 85. Q&ACopyright 2011 Amazon Web Services 86. WebAWS Reloaded!AWS 5/21 ELB & CloudWatch & Auto Scaling 5/28 AWS SDK for Java/ AWS Toolkit for Eclipse http://aws.amazon.com/jp/event_schedule/ http://aws.amazon.com/jp/aws-meister/ 87. Copyright 2011 Amazon Web Services