SlideShare una empresa de Scribd logo
1 de 46
Descargar para leer sin conexión
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in partwithout the express consent of Amazon.com, Inc. 
November 13, 2014 | Las Vegas 
Elastic Load Balancing 
Deep Dive & Best Practices 
David Brown, Director, Software Engineering
Elastic Load Balancingautomatically distributes incoming application traffic across multiple 
Amazon EC2instances.
Secure 
Elastic 
Integrated 
Cost Effective
EC2 
Instance
Load Balancer used to route incoming requests to multiple EC2 instances. 
ELB 
EC2 
Instance 
EC2 
Instance 
EC2 
Instance
Load balance over classic EC2 instances. 
Support for public IP addresses only. 
No control over the load balancer security group. 
Load balance over EC2 instances within a VPC. 
Support for both public and private IP addresses. 
Full control over the load balancer security group. 
Tightly integrated into the associated VPC and subnets. 
EC2-Classic 
EC2-VPC
Architecture 
Customer VPC 
EC2 
Instance 
EC2 
Instance 
us-west-1a 
us-west-1b 
AmazonRoute 53 
ELB VPC 
ELB 
ELB
HTTP/HTTPS 
TCP/SSL 
Incoming client connection bound to server connection 
No header modification 
Proxy Protocolprepends source and destination IP and ports to request 
Round robin algorithm used for request routing 
Connection terminated at the load balancer and pooled to the server 
Headers may be modified 
X-Forwarded-Forheader contains client IP address 
Least outstandingrequests algorithm used for request routing 
Sticky session support available
Health checksallow for traffic to be shifted away from failed instances
ELB 
EC2 
Instance 
EC2 
Instance 
EC2 
Instance 
Health checks ensure that request traffic is shifted away from a failed instance. 
Health Checks
Support for TCP and HTTP health checks. 
Customize the frequency and failure 
thresholds. 
Must return a 2xx response. 
Consider the depth and accuracy of your 
health checks. 
Health Checks
Idle timeoutsallow for connections to be closed by the load balancer when no longer in use.
Length of time that an idle connection should be kept open. 
For both client and back-end connections. 
Defaults to 60 seconds but can be set between 1 and 3,600 seconds. 
Timeouts should decrease as you go 
up the stack. 
Idle Timeouts
15s 
3s 
3s 
ELB 
15s 
EC2 
Instances 
Amazon S3 
Amazon RDS 
Amazon SWF 
3s 
9s 
Idle Timeouts
Using multipleAvailability Zones
Multiple Availability Zones 
ELB VPC 
Customer VPC 
EC2 
Instance 
ELB 
ELB 
EC2 
Instance 
us-west-1a 
us-west-1b 
AmazonRoute 53
Multiple Availability Zones 
ELB VPC 
Customer VPC 
EC2 
Instance 
ELB 
ELB 
us-west-1a 
us-west-1b 
AmazonRoute 53
Always associate two or more subnets in different zoneswith the load balancer
Using multipleAvailability Zones does bring a fewchallenges.
Request Count 
Time 
Traffic Imbalances
Imbalanced Instance Capacity 
ELB VPC 
Customer VPC 
EC2 
Instance 
ELB 
ELB 
us-west-1a 
us-west-1b 
AmazonRoute 53 
EC2 
Instances
Cross-Zone Load Balancing 
ELB VPC 
Customer VPC 
EC2 
Instance 
ELB 
ELB 
us-west-1a 
us-west-1b 
AmazonRoute 53 
EC2 
Instances
Request Count 
Time 
Traffic Imbalances 
Cross-Zone Enabled
Load balancer absorbs impact of DNS caching. 
Eliminates imbalances in back-end instance utilization. 
Requests distributed evenly across multiple 
Availability Zones. 
Check connection limits before enabling. 
No additional bandwidth charge for cross-zone traffic. 
Cross-Zone Load Balancing
Each load balancer domain may contains multiple records. 
Round robin used to balance traffic between Availability Zones. 
DNS records will to change over time; never 
target IP addresses directly. 
After being removed from DNS, IP addresses 
are drained and quarantined for up to 7 days. 
Understanding DNS
DNS caching by clients and ISPs can often cause clients to target a specific IP address or stop resolving at all. 
Register a wildcard CNAME or ALIAS within Amazon Route 53. 
// Create a wildcard CNAME or ALIAS in Route 53. 
*.example.com ALIAS … elb-12345.us-east-1.elb.amazon.com 
*.example.com CNAME elb-12345.us-east-1.elb.amazon.com 
// prepend random content for each lookup made by the application. 
PROMPT> dig +short 25a8ade5-6557-4a54-a60e-8f51f3b195d1.example.com 
192.0.2.1 
192.0.2.2 
DNS Optimization
SSL Offloading 
Support for both SSL and HTTPs is provided. 
Support for latest ciphers and protocols including Elliptical Curve Ciphers and Perfect Forward Secrecy. 
Ability to fully customize ciphers and protocols to be used by each load balancer. 
SSL Negotiation Suites provided to remove complexity of selecting ciphers and protocols.
SSL Negotiation Policies 
Provide selection of ciphers and protocols that adhere to the latest industry best practices. 
Balance security best practices with client’s ability to negotiate a connection, generated using traffic to Amazon.com. 
Released on a regular cadence or when new 
vulnerabilities are published. 
Default for all new load balancers.
POODLE Mitigation 
Within 24 hours, 62% of load balancers migrated to the latest SSL Negotiation Policy, disabling SSLv3.
@awscloud Thank-you #AWS for making it so easy to prevent#sslv3 #poodleattack Only took about 3 clicks of my mouse. 
“ 
” 
@granticini
13 CloudWatch metrics provided for each load balancer. 
Provide detailed insight into the health of the load balancer and application stack. 
CloudWatch alarms can be configured to notify or take action should any metric go outside of the acceptable range. 
All metrics provided at the 1-minute granularity. 
Amazon CloudWatch Metrics
HealthyHostCount 
The count of the number of healthy instances in each Availability Zone. 
Most common cause of unhealthy hosts are health check exceeding the allocated timeout. 
Test by making repeated requests to the back- end instance from another EC2 instance. 
View at the zonal dimension.
Latency 
Measures the time elapsed in seconds after the request leaves the load balancer until the response is received. 
Test by sending requests to the back-end instance from another instance. 
Using min, average and max CloudWatch stats 
provide upper and lower bounds for latency. 
Debug individual requests using Access Logs.
SurgeQueue and Spillovers 
Count of the number of requests that could not be sent to back-end instances. 
Queue up to 1024 requests per load balancer 
node, after which 503 errors will be returned. 
Often caused by not being able to open 
connections to the back-end instance. 
Normally a sign of an under-scaled application.
CloudWatch and AutoScaling 
All load balancer metrics can be used for AutoScaling. 
Allow you to scale dynamically based on the load 
balancers view of the application. 
Important to consider all metrics when using 
AutoScaling, may not be aware of resource 
contention on another metric. 
You may be at peak multiple times a day.
Provide detailed information on each request processed by the load balancer. 
Includes request time, client IP address, latencies, request path, and server responses. 
Delivered to an Amazon S3 bucket every 5 or 60 minutes. 
Access Logs
Access Logs 
ELB VPC 
ELB 
ELB 
ELB 
Amazon S3 
Logs indexed by date but include the IP address of the load balancer node itself.
•timestamp 
•elb name 
•client:port 
•backend:port 
•request_processing_time 
•backend_processing_time 
•response_processing_time 
•elb_status_code 
•backend_state_code 
•received_bytes 
•sent_bytes 
•“request” 
2014-02-15T23:39:43.945958Z my-test-loadbalancer 192.168.131.39:2817 10.0.0.0.1 0.000073 0.001048 0.000057 200 200 0 29 "GET http://www.example.com:80/HTTP/1.1" 
Access Logs
“Everything fails all the time” 
Werner Vogels, CTO, Amazon.com
Be prepared to do nothing!
Mitigation 
Isolation 
Restore 
Redundancy
Mitigation 
All load balancers scaled to handle loss of single Availability Zone. 
Amazon Route 53 health checks shift traffic away from the failed Availability Zone. 
Completed within 150 seconds. 
No other external or control plane dependencies.
Isolation 
Other zones must remain unaffected. 
Avoid dependencies between zones. 
Be careful of work generated as a result of the event. 
Operating at reduced capacity but stable.
Health checkers and edge locations perform the same volume of activity whether endpoints are healthy or unhealthy. 
Constant Work 
time 
System activity 
Time to react 
When nothing is failing, volume of API calls is zero. When failure occurs, volume of API calls spikes. 
time 
System activity 
Time to react 
Work on Failure
Restore Redundancy 
Restoring the system back to full capacity. 
Avoid putting additional load on the system by rushing this step. 
Ensure that recovered resources are left in a consistent state. 
Full recovered when done.
Please give us your feedback on this presentation 
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in partwithout the express consent of Amazon.com, Inc. 
Join the conversation on Twitter with #reinvent 
SDD423

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

AWS Webcast - Design for Availability
AWS Webcast - Design for AvailabilityAWS Webcast - Design for Availability
AWS Webcast - Design for Availability
 
使用 AWS 負載平衡服務讓您的應用程式規模化
使用 AWS 負載平衡服務讓您的應用程式規模化使用 AWS 負載平衡服務讓您的應用程式規模化
使用 AWS 負載平衡服務讓您的應用程式規模化
 
Hack-Proof Your Cloud: Responding to 2016 Threats
Hack-Proof Your Cloud: Responding to 2016 ThreatsHack-Proof Your Cloud: Responding to 2016 Threats
Hack-Proof Your Cloud: Responding to 2016 Threats
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
 
Deep Dive on Elastic Load Balancing
Deep Dive on Elastic Load BalancingDeep Dive on Elastic Load Balancing
Deep Dive on Elastic Load Balancing
 
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar SeriesAmazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
 
The Pace of Innovation - Pop-up Loft Tel Aviv
The Pace of Innovation - Pop-up Loft Tel AvivThe Pace of Innovation - Pop-up Loft Tel Aviv
The Pace of Innovation - Pop-up Loft Tel Aviv
 
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFrontAWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
 
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
AWS APAC Webinar Week - AWS MySQL Relational Database Services Best Practices...
AWS APAC Webinar Week - AWS MySQL Relational Database Services Best Practices...AWS APAC Webinar Week - AWS MySQL Relational Database Services Best Practices...
AWS APAC Webinar Week - AWS MySQL Relational Database Services Best Practices...
 
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
 
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
 
AWS Activate webinar - Scalable databases for fast growing startups
AWS Activate webinar - Scalable databases for fast growing startupsAWS Activate webinar - Scalable databases for fast growing startups
AWS Activate webinar - Scalable databases for fast growing startups
 
AWS re:Invent 2016: Proactive Security Testing in AWS: From Early Implementat...
AWS re:Invent 2016: Proactive Security Testing in AWS: From Early Implementat...AWS re:Invent 2016: Proactive Security Testing in AWS: From Early Implementat...
AWS re:Invent 2016: Proactive Security Testing in AWS: From Early Implementat...
 
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...
AWS re:Invent 2016: Managing and Supporting the Windows Platform on AWS (GPSS...
 
How to Design for High Availability & Scale with AWS
How to Design for High Availability & Scale with AWSHow to Design for High Availability & Scale with AWS
How to Design for High Availability & Scale with AWS
 
Amazon EC2:Masterclass
Amazon EC2:MasterclassAmazon EC2:Masterclass
Amazon EC2:Masterclass
 
Aws Architecture Fundamentals
Aws Architecture FundamentalsAws Architecture Fundamentals
Aws Architecture Fundamentals
 

Similar a (SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent 2014

Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Amazon Web Services
 
AcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptxAcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptx
rawwatchtime
 

Similar a (SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent 2014 (20)

(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices
 
Deep Dive on Elastic Load Balancing
Deep Dive on Elastic Load BalancingDeep Dive on Elastic Load Balancing
Deep Dive on Elastic Load Balancing
 
SRV417 Deep Dive on Elastic Load Balancing
SRV417 Deep Dive on Elastic Load BalancingSRV417 Deep Dive on Elastic Load Balancing
SRV417 Deep Dive on Elastic Load Balancing
 
Deep Dive on Elastic Load Balancing
Deep Dive on Elastic Load BalancingDeep Dive on Elastic Load Balancing
Deep Dive on Elastic Load Balancing
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWS
 
Scalable Web Apps - Journey Through the Cloud
Scalable Web Apps - Journey Through the CloudScalable Web Apps - Journey Through the Cloud
Scalable Web Apps - Journey Through the Cloud
 
AWS Atlanta meetup load-balancing
AWS Atlanta meetup load-balancingAWS Atlanta meetup load-balancing
AWS Atlanta meetup load-balancing
 
Amazon Elastic Load Balancing
Amazon Elastic Load BalancingAmazon Elastic Load Balancing
Amazon Elastic Load Balancing
 
AWS fault tolerant architecture
AWS fault tolerant architectureAWS fault tolerant architecture
AWS fault tolerant architecture
 
Scalable web apps on AWS - Hebrew Webinar September 2017
Scalable web apps on AWS - Hebrew Webinar September 2017Scalable web apps on AWS - Hebrew Webinar September 2017
Scalable web apps on AWS - Hebrew Webinar September 2017
 
AWS_ELB_ppt.pptx
AWS_ELB_ppt.pptxAWS_ELB_ppt.pptx
AWS_ELB_ppt.pptx
 
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
 
AWS Interview Questions and Answers -CREDO SYSTEMZ.pdf
AWS Interview Questions and Answers -CREDO SYSTEMZ.pdfAWS Interview Questions and Answers -CREDO SYSTEMZ.pdf
AWS Interview Questions and Answers -CREDO SYSTEMZ.pdf
 
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
Auto-Scaling Web Application Security in Amazon Web Services (SEC308) | AWS r...
 
AcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptxAcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptx
 
AWS Elastic Load Balancing for AWS Architect & SysOps Certification
AWS Elastic Load Balancing for AWS Architect & SysOps CertificationAWS Elastic Load Balancing for AWS Architect & SysOps Certification
AWS Elastic Load Balancing for AWS Architect & SysOps Certification
 
Oracle COTS Applications on AWS
Oracle COTS Applications on AWSOracle COTS Applications on AWS
Oracle COTS Applications on AWS
 
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
More Nines for Your Dimes: Improving Availability and Lowering Costs using Au...
 
Building Scalable Websites for the Cloud
Building Scalable Websites for the CloudBuilding Scalable Websites for the Cloud
Building Scalable Websites for the Cloud
 
Testing Framework on AWS Cloud - Solution Set
Testing Framework on AWS Cloud - Solution SetTesting Framework on AWS Cloud - Solution Set
Testing Framework on AWS Cloud - Solution Set
 

Más de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

(SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent 2014

  • 1. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in partwithout the express consent of Amazon.com, Inc. November 13, 2014 | Las Vegas Elastic Load Balancing Deep Dive & Best Practices David Brown, Director, Software Engineering
  • 2. Elastic Load Balancingautomatically distributes incoming application traffic across multiple Amazon EC2instances.
  • 3. Secure Elastic Integrated Cost Effective
  • 5. Load Balancer used to route incoming requests to multiple EC2 instances. ELB EC2 Instance EC2 Instance EC2 Instance
  • 6. Load balance over classic EC2 instances. Support for public IP addresses only. No control over the load balancer security group. Load balance over EC2 instances within a VPC. Support for both public and private IP addresses. Full control over the load balancer security group. Tightly integrated into the associated VPC and subnets. EC2-Classic EC2-VPC
  • 7. Architecture Customer VPC EC2 Instance EC2 Instance us-west-1a us-west-1b AmazonRoute 53 ELB VPC ELB ELB
  • 8. HTTP/HTTPS TCP/SSL Incoming client connection bound to server connection No header modification Proxy Protocolprepends source and destination IP and ports to request Round robin algorithm used for request routing Connection terminated at the load balancer and pooled to the server Headers may be modified X-Forwarded-Forheader contains client IP address Least outstandingrequests algorithm used for request routing Sticky session support available
  • 9. Health checksallow for traffic to be shifted away from failed instances
  • 10. ELB EC2 Instance EC2 Instance EC2 Instance Health checks ensure that request traffic is shifted away from a failed instance. Health Checks
  • 11. Support for TCP and HTTP health checks. Customize the frequency and failure thresholds. Must return a 2xx response. Consider the depth and accuracy of your health checks. Health Checks
  • 12. Idle timeoutsallow for connections to be closed by the load balancer when no longer in use.
  • 13. Length of time that an idle connection should be kept open. For both client and back-end connections. Defaults to 60 seconds but can be set between 1 and 3,600 seconds. Timeouts should decrease as you go up the stack. Idle Timeouts
  • 14. 15s 3s 3s ELB 15s EC2 Instances Amazon S3 Amazon RDS Amazon SWF 3s 9s Idle Timeouts
  • 16. Multiple Availability Zones ELB VPC Customer VPC EC2 Instance ELB ELB EC2 Instance us-west-1a us-west-1b AmazonRoute 53
  • 17. Multiple Availability Zones ELB VPC Customer VPC EC2 Instance ELB ELB us-west-1a us-west-1b AmazonRoute 53
  • 18. Always associate two or more subnets in different zoneswith the load balancer
  • 19. Using multipleAvailability Zones does bring a fewchallenges.
  • 20. Request Count Time Traffic Imbalances
  • 21. Imbalanced Instance Capacity ELB VPC Customer VPC EC2 Instance ELB ELB us-west-1a us-west-1b AmazonRoute 53 EC2 Instances
  • 22. Cross-Zone Load Balancing ELB VPC Customer VPC EC2 Instance ELB ELB us-west-1a us-west-1b AmazonRoute 53 EC2 Instances
  • 23. Request Count Time Traffic Imbalances Cross-Zone Enabled
  • 24. Load balancer absorbs impact of DNS caching. Eliminates imbalances in back-end instance utilization. Requests distributed evenly across multiple Availability Zones. Check connection limits before enabling. No additional bandwidth charge for cross-zone traffic. Cross-Zone Load Balancing
  • 25. Each load balancer domain may contains multiple records. Round robin used to balance traffic between Availability Zones. DNS records will to change over time; never target IP addresses directly. After being removed from DNS, IP addresses are drained and quarantined for up to 7 days. Understanding DNS
  • 26. DNS caching by clients and ISPs can often cause clients to target a specific IP address or stop resolving at all. Register a wildcard CNAME or ALIAS within Amazon Route 53. // Create a wildcard CNAME or ALIAS in Route 53. *.example.com ALIAS … elb-12345.us-east-1.elb.amazon.com *.example.com CNAME elb-12345.us-east-1.elb.amazon.com // prepend random content for each lookup made by the application. PROMPT> dig +short 25a8ade5-6557-4a54-a60e-8f51f3b195d1.example.com 192.0.2.1 192.0.2.2 DNS Optimization
  • 27. SSL Offloading Support for both SSL and HTTPs is provided. Support for latest ciphers and protocols including Elliptical Curve Ciphers and Perfect Forward Secrecy. Ability to fully customize ciphers and protocols to be used by each load balancer. SSL Negotiation Suites provided to remove complexity of selecting ciphers and protocols.
  • 28. SSL Negotiation Policies Provide selection of ciphers and protocols that adhere to the latest industry best practices. Balance security best practices with client’s ability to negotiate a connection, generated using traffic to Amazon.com. Released on a regular cadence or when new vulnerabilities are published. Default for all new load balancers.
  • 29. POODLE Mitigation Within 24 hours, 62% of load balancers migrated to the latest SSL Negotiation Policy, disabling SSLv3.
  • 30. @awscloud Thank-you #AWS for making it so easy to prevent#sslv3 #poodleattack Only took about 3 clicks of my mouse. “ ” @granticini
  • 31. 13 CloudWatch metrics provided for each load balancer. Provide detailed insight into the health of the load balancer and application stack. CloudWatch alarms can be configured to notify or take action should any metric go outside of the acceptable range. All metrics provided at the 1-minute granularity. Amazon CloudWatch Metrics
  • 32. HealthyHostCount The count of the number of healthy instances in each Availability Zone. Most common cause of unhealthy hosts are health check exceeding the allocated timeout. Test by making repeated requests to the back- end instance from another EC2 instance. View at the zonal dimension.
  • 33. Latency Measures the time elapsed in seconds after the request leaves the load balancer until the response is received. Test by sending requests to the back-end instance from another instance. Using min, average and max CloudWatch stats provide upper and lower bounds for latency. Debug individual requests using Access Logs.
  • 34. SurgeQueue and Spillovers Count of the number of requests that could not be sent to back-end instances. Queue up to 1024 requests per load balancer node, after which 503 errors will be returned. Often caused by not being able to open connections to the back-end instance. Normally a sign of an under-scaled application.
  • 35. CloudWatch and AutoScaling All load balancer metrics can be used for AutoScaling. Allow you to scale dynamically based on the load balancers view of the application. Important to consider all metrics when using AutoScaling, may not be aware of resource contention on another metric. You may be at peak multiple times a day.
  • 36. Provide detailed information on each request processed by the load balancer. Includes request time, client IP address, latencies, request path, and server responses. Delivered to an Amazon S3 bucket every 5 or 60 minutes. Access Logs
  • 37. Access Logs ELB VPC ELB ELB ELB Amazon S3 Logs indexed by date but include the IP address of the load balancer node itself.
  • 38. •timestamp •elb name •client:port •backend:port •request_processing_time •backend_processing_time •response_processing_time •elb_status_code •backend_state_code •received_bytes •sent_bytes •“request” 2014-02-15T23:39:43.945958Z my-test-loadbalancer 192.168.131.39:2817 10.0.0.0.1 0.000073 0.001048 0.000057 200 200 0 29 "GET http://www.example.com:80/HTTP/1.1" Access Logs
  • 39. “Everything fails all the time” Werner Vogels, CTO, Amazon.com
  • 40. Be prepared to do nothing!
  • 42. Mitigation All load balancers scaled to handle loss of single Availability Zone. Amazon Route 53 health checks shift traffic away from the failed Availability Zone. Completed within 150 seconds. No other external or control plane dependencies.
  • 43. Isolation Other zones must remain unaffected. Avoid dependencies between zones. Be careful of work generated as a result of the event. Operating at reduced capacity but stable.
  • 44. Health checkers and edge locations perform the same volume of activity whether endpoints are healthy or unhealthy. Constant Work time System activity Time to react When nothing is failing, volume of API calls is zero. When failure occurs, volume of API calls spikes. time System activity Time to react Work on Failure
  • 45. Restore Redundancy Restoring the system back to full capacity. Avoid putting additional load on the system by rushing this step. Ensure that recovered resources are left in a consistent state. Full recovered when done.
  • 46. Please give us your feedback on this presentation © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in partwithout the express consent of Amazon.com, Inc. Join the conversation on Twitter with #reinvent SDD423