SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
David Pessis, Engineering Manager – Elastic Load Balancing
July 13, 2016
Deep Dive on Elastic Load Balancing and
Best Practices
Elastic Load Balancing automatically distributes
incoming application traffic across multiple
Amazon EC2 instances.
SecureElastic 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-1aus-west-1b
Amazon
Route 53
ELB VPC
ELB
ELB
HTTP/HTTPSTCP/SSL
Incoming client connection bound to
server connection
No header modification
Proxy Protocol prepends 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-For header contains
client IP address
Least outstanding requests algorithm
used for request routing
Sticky session support available
Health checks allow 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 timeouts allow 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 backend 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 multiple
Availability Zones
Multiple Availability Zones
ELB VPC Customer VPC
EC2
InstanceELB
ELB
EC2
Instance
us-west-1aus-west-1b
Amazon
Route 53
Multiple Availability Zones
ELB VPC Customer VPC
EC2
InstanceELB
ELB
us-west-1aus-west-1b
Amazon
Route 53
Always associate two
or more subnets in
different zones with
the load balancer
Using multiple Availability Zones
does bring a few challenges.
RequestCount
Time
Traffic Imbalances
Imbalanced Instance Capacity
ELB VPC Customer VPC
EC2
InstanceELB
ELB
us-west-1aus-west-1b
Amazon
Route 53
EC2
Instances
Cross-Zone Load Balancing
ELB VPC Customer VPC
EC2
InstanceELB
ELB
us-west-1aus-west-1b
Amazon
Route 53
EC2
Instances
RequestCount
Time
Traffic Imbalances
Cross-Zone Enabled
Load balancer absorbs impact of DNS caching.
Eliminates imbalances in backend 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 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 is
health check exceeding the allocated timeout.
Test by making repeated requests to the
backend instance from another EC2 instance.
View at the zonal dimension.
Latency
Measures the elapsed time, in seconds, from when the request leaves the
load balancer until the response is received.
Test by sending requests to the backend instance from another instance.
Using min, average, and max CloudWatch stats,
provide upper and lower bounds for latency.
Debug individual requests using access logs.
Surge Queue and Spillovers
Count of the number of requests that could not be sent to backend
instances.
Queue up to 1,024 requests per load balancer
node, after which 503 errors will be returned.
Often caused by not being able to open
connections to the backend instance.
Normally a sign of an under-scaled application.
CloudWatch and Auto Scaling
All load balancer metrics can be used for Auto Scaling.
Allows you to scale dynamically, based on the load
balancer's view of the application.
Important to consider all metrics when using
Auto Scaling; 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 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.
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 to full capacity.
Avoid putting additional load on the system
by rushing this step.
Ensure that recovered resources are left in
a consistent state.
Fully recovered when done.
Remember to complete
your evaluations!
Remember to complete
your evaluations!
Thank You!
Twitter: @davidpessis

Weitere ähnliche Inhalte

Was ist angesagt?

Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017
Amazon Web Services
 

Was ist angesagt? (20)

Accelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
Accelerating the Transition to Broadcast and OTT Infrastructure in the CloudAccelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
Accelerating the Transition to Broadcast and OTT Infrastructure in the Cloud
 
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity OptionsCreating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
 
Build a Serverless Web Application in One Day Workshop - DevDay Los Angeles 2017
Build a Serverless Web Application in One Day Workshop - DevDay Los Angeles 2017Build a Serverless Web Application in One Day Workshop - DevDay Los Angeles 2017
Build a Serverless Web Application in One Day Workshop - DevDay Los Angeles 2017
 
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
AWS re:Invent 2016: NEW LAUNCH! Lambda Everywhere (IOT309)
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
Ceate a Scalable Cloud Architecture
Ceate a Scalable Cloud ArchitectureCeate a Scalable Cloud Architecture
Ceate a Scalable Cloud Architecture
 
Amazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel AvivAmazon EC2 - Masterclass - Pop-up Loft Tel Aviv
Amazon EC2 - Masterclass - Pop-up Loft Tel Aviv
 
Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
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)
 
NEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# ApplicationsNEW LAUNCH! Developing Serverless C# Applications
NEW LAUNCH! Developing Serverless C# Applications
 
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
 
Scaling up to your first 10 million users - Pop-up Loft Tel Aviv
Scaling up to your first 10 million users - Pop-up Loft Tel AvivScaling up to your first 10 million users - Pop-up Loft Tel Aviv
Scaling up to your first 10 million users - Pop-up Loft Tel Aviv
 
Real-Time Processing Using AWS Lambda
Real-Time Processing Using AWS LambdaReal-Time Processing Using AWS Lambda
Real-Time Processing Using AWS Lambda
 
February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive
 
(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
 
Getting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute ServicesGetting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute Services
 
Build A Website on AWS for Your First 10 Million Users
Build A Website on AWS for Your First 10 Million UsersBuild A Website on AWS for Your First 10 Million Users
Build A Website on AWS for Your First 10 Million Users
 
AWS re:Invent 2016: From EC2 to ECS: How Capital One uses Application Load Ba...
AWS re:Invent 2016: From EC2 to ECS: How Capital One uses Application Load Ba...AWS re:Invent 2016: From EC2 to ECS: How Capital One uses Application Load Ba...
AWS re:Invent 2016: From EC2 to ECS: How Capital One uses Application Load Ba...
 

Andere mochten auch

Andere mochten auch (20)

AWS Keynote II - New Services Showcase: Connecting the Dots
AWS Keynote II - New Services Showcase: Connecting the DotsAWS Keynote II - New Services Showcase: Connecting the Dots
AWS Keynote II - New Services Showcase: Connecting the Dots
 
AWS Security and Compliance
AWS Security and ComplianceAWS Security and Compliance
AWS Security and Compliance
 
Another Day, Another Billion Packets
Another Day, Another Billion PacketsAnother Day, Another Billion Packets
Another Day, Another Billion Packets
 
Secure Content Delivery with AWS
Secure Content Delivery with AWSSecure Content Delivery with AWS
Secure Content Delivery with AWS
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Building Your Practice on AWS: An APN Breakfast Session
Building Your Practice on AWS: An APN Breakfast SessionBuilding Your Practice on AWS: An APN Breakfast Session
Building Your Practice on AWS: An APN Breakfast Session
 
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar SeriesMobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
Mobile App Testing with AWS Device Farm - AWS July 2016 Webinar Series
 
AWS Data Transfer Services: Data Ingest Strategies Into the AWS Cloud
AWS Data Transfer Services: Data Ingest Strategies Into the AWS CloudAWS Data Transfer Services: Data Ingest Strategies Into the AWS Cloud
AWS Data Transfer Services: Data Ingest Strategies Into the AWS Cloud
 
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
AWS re:Invent 2016: Wild Rydes Takes Off – The Dawn of a New Unicorn (SVR309)
 
Born in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a StartupBorn in the Cloud; Build it Like a Startup
Born in the Cloud; Build it Like a Startup
 
Deep Dive on Amazon Aurora - Covering New Feature Announcements
Deep Dive on Amazon Aurora - Covering New Feature AnnouncementsDeep Dive on Amazon Aurora - Covering New Feature Announcements
Deep Dive on Amazon Aurora - Covering New Feature Announcements
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
AWS as a Data Platform for Cloud and On-Premises Workloads | AWS Public Secto...
AWS as a Data Platform for Cloud and On-Premises Workloads | AWS Public Secto...AWS as a Data Platform for Cloud and On-Premises Workloads | AWS Public Secto...
AWS as a Data Platform for Cloud and On-Premises Workloads | AWS Public Secto...
 
NEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-RayNEW LAUNCH! Introduction to AWS X-Ray
NEW LAUNCH! Introduction to AWS X-Ray
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
AWS re:Invent 2016: Serverless to 32 XLarge: A Unified Security Approach To A...
AWS re:Invent 2016: Serverless to 32 XLarge: A Unified Security Approach To A...AWS re:Invent 2016: Serverless to 32 XLarge: A Unified Security Approach To A...
AWS re:Invent 2016: Serverless to 32 XLarge: A Unified Security Approach To A...
 
NEW LAUNCH! How to Enable Real-Time Mobile App Engagement with Amazon Pinpoint
NEW LAUNCH! How to Enable Real-Time Mobile App Engagement with Amazon PinpointNEW LAUNCH! How to Enable Real-Time Mobile App Engagement with Amazon Pinpoint
NEW LAUNCH! How to Enable Real-Time Mobile App Engagement with Amazon Pinpoint
 
Moving Your Media Supply Chain to the AWS Cloud
Moving Your Media Supply Chain to the AWS CloudMoving Your Media Supply Chain to the AWS Cloud
Moving Your Media Supply Chain to the AWS Cloud
 
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
AWS re:Invent 2016| GAM401 | Riot Games: Standardizing Application Deployment...
 
透過Amazon Launchpad Program 速進新創公司成功跨境
透過Amazon Launchpad Program 速進新創公司成功跨境透過Amazon Launchpad Program 速進新創公司成功跨境
透過Amazon Launchpad Program 速進新創公司成功跨境
 

Ähnlich wie Deep Dive on Elastic Load Balancing

AcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptxAcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptx
rawwatchtime
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
PolarSeven Pty Ltd
 

Ähnlich wie Deep Dive on Elastic Load Balancing (20)

Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel AvivElastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
 
(SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent ...
(SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent ...(SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent ...
(SDD423) Elastic Load Balancing Deep Dive and Best Practices | AWS re:Invent ...
 
Deep Dive on Elastic Load Balancing
Deep Dive on Elastic Load BalancingDeep Dive on Elastic Load Balancing
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
 
Application Load Balancer and the integration with AutoScaling and ECS - Pop-...
Application Load Balancer and the integration with AutoScaling and ECS - Pop-...Application Load Balancer and the integration with AutoScaling and ECS - Pop-...
Application Load Balancer and the integration with AutoScaling and ECS - Pop-...
 
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
 
AWS fault tolerant architecture
AWS fault tolerant architectureAWS fault tolerant architecture
AWS fault tolerant architecture
 
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
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
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
 
Amazon Elastic Load Balancing
Amazon Elastic Load BalancingAmazon Elastic Load Balancing
Amazon 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
 
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
 
AcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptxAcademyCloudFoundations_Module_10 (2).pptx
AcademyCloudFoundations_Module_10 (2).pptx
 
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
 
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
 
AWS_ELB_ppt.pptx
AWS_ELB_ppt.pptxAWS_ELB_ppt.pptx
AWS_ELB_ppt.pptx
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
 
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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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...
 
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
 
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...
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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?
 

Deep Dive on Elastic Load Balancing

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. David Pessis, Engineering Manager – Elastic Load Balancing July 13, 2016 Deep Dive on Elastic Load Balancing and Best Practices
  • 2. Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances.
  • 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
  • 8. HTTP/HTTPSTCP/SSL Incoming client connection bound to server connection No header modification Proxy Protocol prepends 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-For header contains client IP address Least outstanding requests algorithm used for request routing Sticky session support available
  • 9. Health checks allow 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 timeouts allow 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 backend 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
  • 16. Multiple Availability Zones ELB VPC Customer VPC EC2 InstanceELB ELB EC2 Instance us-west-1aus-west-1b Amazon Route 53
  • 17. Multiple Availability Zones ELB VPC Customer VPC EC2 InstanceELB ELB us-west-1aus-west-1b Amazon Route 53
  • 18. Always associate two or more subnets in different zones with the load balancer
  • 19. Using multiple Availability Zones does bring a few challenges.
  • 21. Imbalanced Instance Capacity ELB VPC Customer VPC EC2 InstanceELB ELB us-west-1aus-west-1b Amazon Route 53 EC2 Instances
  • 22. Cross-Zone Load Balancing ELB VPC Customer VPC EC2 InstanceELB ELB us-west-1aus-west-1b Amazon Route 53 EC2 Instances
  • 24. Load balancer absorbs impact of DNS caching. Eliminates imbalances in backend 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 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 is health check exceeding the allocated timeout. Test by making repeated requests to the backend instance from another EC2 instance. View at the zonal dimension.
  • 33. Latency Measures the elapsed time, in seconds, from when the request leaves the load balancer until the response is received. Test by sending requests to the backend 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. Surge Queue and Spillovers Count of the number of requests that could not be sent to backend instances. Queue up to 1,024 requests per load balancer node, after which 503 errors will be returned. Often caused by not being able to open connections to the backend instance. Normally a sign of an under-scaled application.
  • 35. CloudWatch and Auto Scaling All load balancer metrics can be used for Auto Scaling. Allows you to scale dynamically, based on the load balancer's view of the application. Important to consider all metrics when using Auto Scaling; 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 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. 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 to full capacity. Avoid putting additional load on the system by rushing this step. Ensure that recovered resources are left in a consistent state. Fully recovered when done.
  • 46. Remember to complete your evaluations! Remember to complete your evaluations!