SlideShare a Scribd company logo
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
AWS ELB
Tips & Best Practices
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
By Steve Mushero
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
AGENDA I
Load testing
SSL
CNAMES
LB Within regions vs. across
L4 Issues
Internal LB - Don’t forget this
Logging
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
AGENDA II
X-Forwarded-For
Stickiness
In/Out & A/B Deploy
Draining
CLI use (role in CI/CD)
API use
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
ELBS ARE GREAT – USUALLY
• Very easy to use
• But some issues
• Limited Features
• Need extra work to work well
• Still need to manage & monitor it
• Good to know how it works
• We often use HAProxy with ELB
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
LOAD TESTING ELBS
• Can Load Test
• But Be Careful – Easy to Overload
• ELBs Automatically Managed
• ELBs Scaled Automatically
• Must Have Time to Adjust - Minutes
• Call Support For Pre-Warming for Scale
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
SSL IN ELB
• Supported !
• Many New Features
• Now in Console (was CLI only)
• Integrated with Cert Manager
• Use CLI / API for advanced stuff
• Careful of Cipher Options – Use latest
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
SECURITY GROUPS IN ELB
• Don’t forget these
• Especially for Dev/Test
• Front door of your system
• Name Clearly so ELB vs. EC2 VM
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
CNAMES
• Each ELB Cluster will have ONE
• You MUST use IT
• Do NOT use ELB’s IP
• It will change on failure or scale
• Remember, one ELB Instance per AZ
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
ELB WITHIN & ACROSS AVAIL ZONES
• One ELB instance per AZ
• Load Balancing is ACROSS ZONES
• NOT really across servers
• So use same # of VMs per Zone
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
ELB L4 SUPPORT
• Nice feature
• For non-HTTP
• APIs
• Web Sockets / Pollers
• Chat Systems
• Databases
• Games
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
INTERNAL ELB
• Between Subnets
• Useful for DB LB (read)
• Useful for internal HTTP
• Search, etc.
• Helps Separate Services
• Use with Docker / Micro-Services
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
ELB LOGGING
• Don’t forget this
• Disabled by Default
• Push HTTP Logs to S3
• Every 5 minutes
• Has response time / latency
• Need tools to read / analyze
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
X-FORWARDED-FOR HEADER
• Don’t forget this
• ELB will add this header
• Needed for Nginx/Apache to log real IP
• On by default, but you must use it
• You need to change your log format
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
STICKINESS
• How Existing Users are Distributed
• Required if no shared-session Cache
• Such as Java
• PHP doesn’t need if have Redis
• Even for same user
• ONLY on first time
• Sets Cookie with server ID
• Disabled by Default
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
IN/OUT & BLUE/GREEN DEPLOY
• DevOps Deployment
• Push to 1+ servers / containers
• Test them – Direct or Test ELB
• Cut-Over via ELB Target Pool
• Full or Partial Cut-Overs (Harder)
• Smoke Test Production
• Roll Back if Needed
• Simple with CLI/API
• Also Jenkins, etc. Integrations
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
CONNECTION DRAINING
• When VM Leaves Pool
• No New Conne tions
• But won’t break connections
• Better user experiences
• Remove a Server as Users Finish
• Used for Auto-Scale DOWN
• Also for Deployments
• Must Enable it on ELB
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
ELB CLI USE FOR CI/CD
• AWS CLI is your friend
• Great for testing
• Also calling BASH scripts
• Useful in Automation
• Useful in CI/CI
• Move VMs in/out of pools
• Can do on a control VM with Role
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
AUTO SCALING
• Add VMs with Load
• Uses ELB Metrics
• Many Metrics to use:
• Rejected Connections
• Healthy Host Count
• Latency (Scale on Rise)
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
CLOUD FRONT FOR ELB
• Can use
• Better Performance
• DDoS Protection
• Includes WAF
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
NEW ISSUES
• Micro-Service Hard – Port-to-Port Map
• Thus Poor Support for Docker
• New ALB Helps – Not in China
• Still Limited Features
OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloudOpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud
USE & LOVE YOUR ELBS
ELB ME

More Related Content

PDF
Meetup #4: AWS ELB Deep dive & Best practices
PDF
Serverless computing
PDF
Serverless data processing with Data Pipeline
PPTX
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
PDF
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
PDF
CI&CD on AWS - Meetup Roma Oct 2016
PDF
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
PPTX
Serverless design considerations for Cloud Native workloads
Meetup #4: AWS ELB Deep dive & Best practices
Serverless computing
Serverless data processing with Data Pipeline
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
CI&CD on AWS - Meetup Roma Oct 2016
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
Serverless design considerations for Cloud Native workloads

What's hot (8)

PDF
Serverless Architecture on AWS
PPTX
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
PDF
AWS Lambda Containers - bridging the gap between serverless and containers on...
PPTX
Moving Viadeo to AWS (2015)
PDF
Meeyup aws-loadbalancing-28032015
PDF
Building A Dynamic Website - 31st Jan 2015
PPTX
Developing Java Applications in AWS
PDF
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Serverless Architecture on AWS
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
AWS Lambda Containers - bridging the gap between serverless and containers on...
Moving Viadeo to AWS (2015)
Meeyup aws-loadbalancing-28032015
Building A Dynamic Website - 31st Jan 2015
Developing Java Applications in AWS
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Ad

Viewers also liked (14)

PPTX
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
PDF
Building microservices in python @ pycon2017
PDF
Ovn vancouver
PPTX
OpsStack--Integrated Operation Platform
PPTX
AWS EC2 and ELB troubleshooting
PDF
Aws容器服务详解
PDF
Serverless api gateway + lambda
PPTX
AWS Solutions Architect 準備心得
PPTX
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
PDF
Getting Started with AWS EC2. From Zero to Hero
PDF
零到千万可扩展架构 AWS Architecture Overview
PDF
AwSome day 分享
PDF
基于Aws的持续集成、交付和部署 代闻
PDF
Aws summit devops 云端多环境自动化运维和部署
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Building microservices in python @ pycon2017
Ovn vancouver
OpsStack--Integrated Operation Platform
AWS EC2 and ELB troubleshooting
Aws容器服务详解
Serverless api gateway + lambda
AWS Solutions Architect 準備心得
Internet Cloud Operations - ChinaNetcloud & AWS Event Beijing
Getting Started with AWS EC2. From Zero to Hero
零到千万可扩展架构 AWS Architecture Overview
AwSome day 分享
基于Aws的持续集成、交付和部署 代闻
Aws summit devops 云端多环境自动化运维和部署
Ad

Similar to AWS ELB Tips & Best Practices (20)

PDF
OSOM Operations in the Cloud
PDF
OSOM - Operations in the Cloud
PPTX
vBrownBag AWS Certified SysOps : Associate Domain 4
PDF
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
PPTX
Aws ops works
PPTX
Operators experience and perspective on SDN with VLANs and L3 Networks
PDF
AWS DevOps - Terraform, Docker, HashiCorp Vault
PDF
Cloud Orchestration with RightScale Cloud Workflow
PPTX
Introduction to DevOps on AWS
PDF
saa3_wk5.pdf
PDF
Cloud patterns applied
PDF
Accelerating DevOps Pipelines with AWS
PPTX
AWS fault tolerant architecture
PPTX
Delivering High-Availability Web Services with NGINX Plus on AWS
PPTX
Continuous Deployment with Amazon Web Services by Carlos Conde
PPTX
ECS and Docker at Okta
PPTX
Microservices Design and Best Practices on AWS
PDF
New AWS Services
PPTX
AWS Atlanta meetup load-balancing
PDF
201708 OpenStack Seminar in Myanmar
OSOM Operations in the Cloud
OSOM - Operations in the Cloud
vBrownBag AWS Certified SysOps : Associate Domain 4
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
Aws ops works
Operators experience and perspective on SDN with VLANs and L3 Networks
AWS DevOps - Terraform, Docker, HashiCorp Vault
Cloud Orchestration with RightScale Cloud Workflow
Introduction to DevOps on AWS
saa3_wk5.pdf
Cloud patterns applied
Accelerating DevOps Pipelines with AWS
AWS fault tolerant architecture
Delivering High-Availability Web Services with NGINX Plus on AWS
Continuous Deployment with Amazon Web Services by Carlos Conde
ECS and Docker at Okta
Microservices Design and Best Practices on AWS
New AWS Services
AWS Atlanta meetup load-balancing
201708 OpenStack Seminar in Myanmar

More from ChinaNetCloud (20)

PPTX
ChinaNetCloud Online Lecture:Something About Tshark
PPTX
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
PPTX
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
PPTX
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
PDF
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
PPTX
AWS Summit OaaS Talk by ChinaNetCloud
PDF
Running Internet Systems in China - The Details You Need to Succeed in Chines...
PDF
Making Internet Operations Easier
PPTX
Big Data Security (ChinaNetCloud - Guiyang Conference)
PPTX
Internet System Security Overview
PPTX
Why Work at ChinaNetCloud
PPTX
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
PPTX
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
PPTX
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
PDF
Clouds in China
PPTX
ChinaNetCloud - Public Clouds in China Overview
PPT
ChinaNetCloud - China Internet Infrastructure Summary
PPT
Linux Memory Basics for SysAdmins - ChinaNetCloud Training
PPT
Networking Layer Basics - ChinaNetCloud Training
PPTX
ChinaNetCloud Training - iptables Intro
ChinaNetCloud Online Lecture:Something About Tshark
ChinaNetCloud Online Lecture: Fight Against External Attacks From Different L...
Steve Mushero on Entrepreneurship - 创业 - 崔牛会
云中漫步 颠覆创新_创业邦春季创新峰会主题演讲 Cloud Innovation in China
运维安全 抵抗黑客攻击_云络安全沙龙4月上海站主题分享
AWS Summit OaaS Talk by ChinaNetCloud
Running Internet Systems in China - The Details You Need to Succeed in Chines...
Making Internet Operations Easier
Big Data Security (ChinaNetCloud - Guiyang Conference)
Internet System Security Overview
Why Work at ChinaNetCloud
Cloud Operations Challenges - Talk by ChinaNetCloud at Joint Cisco event
Automatically Managing Internet Operations In The Cloud - 云计算平台的自动化运维
ChinaNetCloud - Aliyun Joint Event on Cloud Operations
Clouds in China
ChinaNetCloud - Public Clouds in China Overview
ChinaNetCloud - China Internet Infrastructure Summary
Linux Memory Basics for SysAdmins - ChinaNetCloud Training
Networking Layer Basics - ChinaNetCloud Training
ChinaNetCloud Training - iptables Intro

Recently uploaded (20)

PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
Internet___Basics___Styled_ presentation
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
Testing WebRTC applications at scale.pdf
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
DOCX
Unit-3 cyber security network security of internet system
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
Sims 4 Historia para lo sims 4 para jugar
QR Codes Qr codecodecodecodecocodedecodecode
The Internet -By the Numbers, Sri Lanka Edition
SASE Traffic Flow - ZTNA Connector-1.pdf
Slides PPTX World Game (s) Eco Economic Epochs.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Introuction about WHO-FIC in ICD-10.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Triggering QUIC, presented by Geoff Huston at IETF 123
Internet___Basics___Styled_ presentation
The New Creative Director: How AI Tools for Social Media Content Creation Are...
522797556-Unit-2-Temperature-measurement-1-1.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Testing WebRTC applications at scale.pdf
Introuction about ICD -10 and ICD-11 PPT.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Unit-3 cyber security network security of internet system
Module 1 - Cyber Law and Ethics 101.pptx

AWS ELB Tips & Best Practices

  • 1. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud AWS ELB Tips & Best Practices OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud By Steve Mushero
  • 2. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud AGENDA I Load testing SSL CNAMES LB Within regions vs. across L4 Issues Internal LB - Don’t forget this Logging
  • 3. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud AGENDA II X-Forwarded-For Stickiness In/Out & A/B Deploy Draining CLI use (role in CI/CD) API use
  • 4. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud ELBS ARE GREAT – USUALLY • Very easy to use • But some issues • Limited Features • Need extra work to work well • Still need to manage & monitor it • Good to know how it works • We often use HAProxy with ELB
  • 5. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud LOAD TESTING ELBS • Can Load Test • But Be Careful – Easy to Overload • ELBs Automatically Managed • ELBs Scaled Automatically • Must Have Time to Adjust - Minutes • Call Support For Pre-Warming for Scale
  • 6. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud SSL IN ELB • Supported ! • Many New Features • Now in Console (was CLI only) • Integrated with Cert Manager • Use CLI / API for advanced stuff • Careful of Cipher Options – Use latest
  • 7. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud SECURITY GROUPS IN ELB • Don’t forget these • Especially for Dev/Test • Front door of your system • Name Clearly so ELB vs. EC2 VM
  • 8. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud CNAMES • Each ELB Cluster will have ONE • You MUST use IT • Do NOT use ELB’s IP • It will change on failure or scale • Remember, one ELB Instance per AZ
  • 9. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud ELB WITHIN & ACROSS AVAIL ZONES • One ELB instance per AZ • Load Balancing is ACROSS ZONES • NOT really across servers • So use same # of VMs per Zone
  • 10. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud ELB L4 SUPPORT • Nice feature • For non-HTTP • APIs • Web Sockets / Pollers • Chat Systems • Databases • Games
  • 11. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud INTERNAL ELB • Between Subnets • Useful for DB LB (read) • Useful for internal HTTP • Search, etc. • Helps Separate Services • Use with Docker / Micro-Services
  • 12. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud ELB LOGGING • Don’t forget this • Disabled by Default • Push HTTP Logs to S3 • Every 5 minutes • Has response time / latency • Need tools to read / analyze
  • 13. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud X-FORWARDED-FOR HEADER • Don’t forget this • ELB will add this header • Needed for Nginx/Apache to log real IP • On by default, but you must use it • You need to change your log format
  • 14. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud STICKINESS • How Existing Users are Distributed • Required if no shared-session Cache • Such as Java • PHP doesn’t need if have Redis • Even for same user • ONLY on first time • Sets Cookie with server ID • Disabled by Default
  • 15. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud IN/OUT & BLUE/GREEN DEPLOY • DevOps Deployment • Push to 1+ servers / containers • Test them – Direct or Test ELB • Cut-Over via ELB Target Pool • Full or Partial Cut-Overs (Harder) • Smoke Test Production • Roll Back if Needed • Simple with CLI/API • Also Jenkins, etc. Integrations
  • 16. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud CONNECTION DRAINING • When VM Leaves Pool • No New Conne tions • But won’t break connections • Better user experiences • Remove a Server as Users Finish • Used for Auto-Scale DOWN • Also for Deployments • Must Enable it on ELB
  • 17. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud ELB CLI USE FOR CI/CD • AWS CLI is your friend • Great for testing • Also calling BASH scripts • Useful in Automation • Useful in CI/CI • Move VMs in/out of pools • Can do on a control VM with Role
  • 18. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud AUTO SCALING • Add VMs with Load • Uses ELB Metrics • Many Metrics to use: • Rejected Connections • Healthy Host Count • Latency (Scale on Rise)
  • 19. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud CLOUD FRONT FOR ELB • Can use • Better Performance • DDoS Protection • Includes WAF
  • 20. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud NEW ISSUES • Micro-Service Hard – Port-to-Port Map • Thus Poor Support for Docker • New ALB Helps – Not in China • Still Limited Features
  • 21. OpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloudOpsStack · Operations-as-a-Service www.ChinaNetCloud.com Copyright © 2017 ChinaNetCloud USE & LOVE YOUR ELBS ELB ME