SlideShare a Scribd company logo
1 of 44
NGINX Plus on AWS 
Scott Ward— Solutions Architect 
scotward@amazon.com
NGINX on AWS 
Who is AWS? 
NGINX – Usage on AWS and best practices 
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
A broad and deep platform that helps customers 
build sophisticated, scalable applications 
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
A Culture of Innovation: Experiment Often & Fail Without 
Risk
Who is using AWS and what are 
they using it for?
Startups on AWS 
http://aws.amazon.com/solutions/case-studies/
Enterprises on AWS 
http://aws.amazon.com/solutions/case-studies/
Foundation 
Services 
Infrastructure 
Storage 
(Object, Block and Archive) 
Regions Availability Zones 
Networking 
Collaboration and Sharing 
Security & 
Access Control 
Platform 
Services 
Databases 
Relational 
NoSQL 
Caching 
Analytics 
Hadoop 
Real-time 
Data 
warehouse 
App Services 
Queuing 
Orchestration 
App streaming 
Transcoding 
Email 
Search 
Deployment & Management 
Containers 
Dev/ops Tools 
Resource 
Templates 
Mobile Services 
Identity 
Sync 
Mobile 
Analytics 
Notifications 
Enterprise 
Applications 
Virtual Desktops 
Data 
Workflows 
Usage 
Tracking 
Monitoring 
and Logs 
Compute 
(VMs, Auto-scaling and Load Balancing) 
CDN and Points of Presence
10 regions 
26 availability 
zones 
52 edge locations 
Infrastructure
AWS Services Overview 
Amazon EC2 – Virtual Servers & resizable compute capacity 
Auto Scaling – Scale compute resources up and down 
Elastic Load Balancing – Load balancer for compute instances 
Amazon Elastic Block Storage (EBS) – Block storage for EC2
AWS Service Overview 
AWS Identity and Access Management – AWS Account Access Controls 
Amazon Route 53 – Scalable Domain Name System 
Amazon CloudWatch – Resource and Application Monitoring
NGINX on AWS
NGINX 
Who is using NGINX on AWS 
• Startups, Enterprises, Government Agencies 
• Example: NASA/JPL Mars Curiosity Mission
NGINX – NASA/JPL
Where NGINX fits
Installing NGINX Plus on AWS 
• Launch from AWS Marketplace 
http://aws.amazon.com/marketplace 
• Search on “NGINX Plus” 
– Amazon Linux 
– Ubuntu 
• 30 Day Free Trial !! 
• Launch and Verify 
– $ /etc/init.d/nginx status
NGINX - Security Recommendations 
Use SSH for accessing your hosts 
Security Groups to control inbound/outbound traffic 
Connection 
Method 
Control access here 
Protocol Port Range Source IP or Group Comments 
HTTP tcp 80-80 CIDR IP Range non-encrypted web traffic 
HTTPS tcp 443-443 CIDR IP Range encrypted web traffic 
SSH tcp 22-22 CIDR IP Range ssh access 
SSH tcp 873-873 CIDR IP Range rsync access 
SSH udp 5405-5405 CIDR IP Range corosync traffic
Load Balancing 
Behind ELB 
Route53 hosted zone 
Elastic Load Balancer 
region 
Web App 1 
NGINX Plus EC2 
instances 
Web App 2 Web App 3
Load Balancing 
DIY 
region 
Web App 1 
NGINX Plus AMI 
Web App 2 Web App 3 
Elastic IP
Load Balancing 
DIY Considerations – Being Auto Scaling Aware 
Command Line Option 
describe-auto-scaling-instances 
describe-instances 
Update NGINX configuration
Load Balancing 
DIY Considerations – Being Auto Scaling Aware 
SQS and SNS for notifications 
Current State 
NGINX 
Auto Scaling group 
Amazon 
SQS 
Scale up 
NGINX 
Auto Scaling group 
Scale down 
Amazon 
SQS 
Amazon SNS 
NGINX 
Auto Scaling group
Performance 
EC2 instance Sizing 
• Workloads vary 
– Start small and move up 
Testing Initial Launch Steady State 
T2 class M3 General 
Auto Scaling group 
Purpose Bigger or More 
EC2 
EC2 
EC2 
EC2 
EC2 
EC2 
EC2
Broad Set of Compute Instance Types… 
GPU 
enabled 
G2 
General 
purpose 
M3 
Memory 
optimized 
R3 
M2 CR1 
Storage and IO 
optimized 
Compute 
optimized 
C3 
C1 CC2 
I2 
HI1 
HS1 
M1 CG1 
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Performance 
Traffic profiles 
• SSL termination = CPU resources 
• Lots of small requests = CPU resources 
• Web Socket = CPU resources 
• Content Caching = Memory & Instance Storage 
• Bandwidth Heavy = Horizontal scaling
Performance Planning 
• Determine the right instance profile 
• Test, Test, Test, Test & Test 
• Run expected and un-expected traffic patterns 
against your environment 
• Analyze results and tweak where needed 
– Throw away what does not work 
• Monitor
Performance Baselines 
Performance testing tools 
– ab 
– jmeter 
– http_load 
– siege 
– curl-loader 
– weighttp 
– httperf 
– wrk 
– sslswamp 
– your favorite tool
Performance Baseline Approaches 
Different Instanc 
e 
Different Availability Zon 
e 
Different Region 
NGINX 
Test 
Instance 
region 
Availability 
Zone 
Availability 
Zone 
NGINX 
Test 
Instance 
NGINX Test 
Availability 
Zone 
region 
Instance 
Availability 
Zone 
region
High Availability – General Recommendations 
Use multiple AZs in a region Auto Scaling to help with load change 
EC2 EC2 
region 
Availability Zone 
2 
Availability Zone 
1 
region 
EC2 EC2 
Auto Scaling group 
Availability Zone 1 
EC2 EC2 
Auto Scaling group 
Availability Zone 2 
s
NGINX High Availability Configuration 
• Highly available pair of NGINX instances on EC2 
with a public IP Address 
• Active/Passive Configuration 
• Corosync and Pacemaker for clustering
NGINX High Availability Configuration 
Elastic IP 
Address 
Corosync/Pacema 
ker 
NGINX EC2 
Primary 
NGINX EC2 
Standby
NGINX High Availability Configuration 
Install and config steps 
• Allocate an Elastic IP address 
• Create IAM Instance Profile 
– Assign Elastic IP 
– Disassociate Elastic IP 
– EC2 Describe 
• Launch instances with IAM Instance Profile 
• Install NGINX HA 
– $sudo yum install nginx-ha 
– $sudo apt-get install nginx-ha 
• Start NGINX HA config on both instances 
– $ sudo nginx-ha-setup 
• Answer questions on both instances 
• Pick a primary 
• Done!!! 
Configuration Verification 
=========== 
Last updated: Wed Mar 19 02:46:49 2014 
Last change: Wed Mar 19 02:46:42 2014 via 
cibadmin on nginxha101 
Stack: openais 
Current DC: nginxha101 – partition with 
quorum 
Version: 1.1.6- 
9971ebba4494012a93c03b40a2c58ec0eb60f50c 
2 Nodes configured, 2 expected votes 
2 Resources configured. 
============ 
Node nginxha100: online 
ha-ip (ocf::heartbeat:IPaddr2) Started 
ha-nginx (ocf::nginx-ha:nginx-ha) Started 
Node nginxha101: online
NGINX High Availability Architecture Options 
Same Region 
Elastic IP 
Primary 
NGINX HA 
Instance 
Web App 1 Web App 2 Web App 3 
region 
Availability Zone 1 
Failover 
NGINX HA 
Instance 
Web App 1 Web App 2 Web App 3 
Availability Zone 2
NGINX High Availability Architecture Options 
Different Regions 
Region 1 
Elastic IP 
Failover NGINX 
HA Instance 
Web App 1 Web App 2 Web App 3 
Availability Zone 2 
Primary NGINX 
HA Instance 
Web App 1 Web App 2 Web App 3 
Availability Zone 1 
Elastic IP 
Failover NGINX 
HA Instance 
Web App 1 Web App 2 Web App 3 
Availability Zone 2 
Primary NGINX 
HA Instance 
Web App 1 Web App 2 Web App 3 
Availability Zone 1 
Region 2 
Amazon Route53 hosted zone
NGINX High Availability Configuration 
Additional Considerations 
• Make sure that both NGINX instances are configured the 
same for their jobs 
• You get Active/Passive with two instances in cluster 
– Active/Active or more than two instances?  Corosync and 
Pacemaker documentation
Monitoring 
Know what is going on with your 
environment at all times
Amazon CloudWatch 
Default Amazon EC2 metrics 
CPU Utilization (Percent) 
Disk Reads (Bytes) 
Disk Read Operations (Operations) 
Disk Writes (Bytes) 
Disk Write Operations (Operations) 
Network In (Bytes) 
Network Out (Bytes) 
Status Check Failed (Count) 
1 or 5 minute intervals
NGINX Metrics into Amazon CloudWatch 
status.html  CloudWatch 
Install Agent 
$ sudo yum install nginx-cw-agent 
$ sudo apt-get install nginx-cw-agent
NGINX Metrics into Amazon CloudWatch 
status.html  CloudWatch 
Update Configuration 
$ /etc/nginx-cw-agent/nginx-cw-agent.ini 
[source1] 
name=exampleorg 
url=http://example.org/status 
[source2] 
name=examplecom 
url=http://example.com/status 
http_user=testuser 
http_pass=testpass
NGINX Metrics into Amazon CloudWatch 
status.html  CloudWatch 
Start Background Agent 
Test - $ /usr/bin/nginx-cw-agent.py –f start 
All in - $ sudo service nginx-cw-agent start 
View Metrics
NGINX with Amazon CloudWatch Logs 
• Consolidate metrics and alarming for log files from 1 or 
many instances 
• Define filters to parse content from your log files 
• Measure and alarm on specific attributes 
• Define retention period for your log files 
EC2 
CloudWatch
NGINX with Amazon CloudWatch Logs 
Filter 
Alarm
NGINX with Amazon CloudWatch Logs 
EC2 
EC2 
EC2 
CloudWatch 
EC2 EC2 
EC2 
Capture logs from multiple instances in one place
Backup Strategy - Options 
Protect your configuration 
• Create an AMI with each new verified config 
• Snapshot the root volume 
• Store config files in Amazon S3 or source repository 
– Deploy via user-data when new Amazon EC2 instance 
launches 
• Continuous integration software to build new AMIs 
with your NGINX configuration
Scott Ward— Solutions Architect 
scotward@amazon.com 
AWS Pop-Up Loft 
925 Market Street 
http://aws.amazon.com/start-ups/loft/ 
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

More Related Content

What's hot

AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018 AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
Amazon Web Services Korea
 

What's hot (20)

Why NGINX Plus/NGINX Controller for NGINX OSS users
Why NGINX Plus/NGINX Controller for NGINX OSS usersWhy NGINX Plus/NGINX Controller for NGINX OSS users
Why NGINX Plus/NGINX Controller for NGINX OSS users
 
AWS Networking – Advanced Concepts and new capabilities | AWS Summit Tel Aviv...
AWS Networking – Advanced Concepts and new capabilities | AWS Summit Tel Aviv...AWS Networking – Advanced Concepts and new capabilities | AWS Summit Tel Aviv...
AWS Networking – Advanced Concepts and new capabilities | AWS Summit Tel Aviv...
 
[AKIBA.AWS] VPN接続とルーティングの基礎
[AKIBA.AWS] VPN接続とルーティングの基礎[AKIBA.AWS] VPN接続とルーティングの基礎
[AKIBA.AWS] VPN接続とルーティングの基礎
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
 
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018 AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
 
インフラ運用の観点から考えるAWS~運用における利点と移行のポイント~
インフラ運用の観点から考えるAWS~運用における利点と移行のポイント~インフラ運用の観点から考えるAWS~運用における利点と移行のポイント~
インフラ運用の観点から考えるAWS~運用における利点と移行のポイント~
 
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
 
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Ingress overview
Ingress overviewIngress overview
Ingress overview
 
AWS Fargate on EKS 실전 사용하기
AWS Fargate on EKS 실전 사용하기AWS Fargate on EKS 실전 사용하기
AWS Fargate on EKS 실전 사용하기
 
NGINX Back to Basic 2 Part 2 (Japanese Webinar)
NGINX Back to Basic 2 Part 2 (Japanese Webinar)NGINX Back to Basic 2 Part 2 (Japanese Webinar)
NGINX Back to Basic 2 Part 2 (Japanese Webinar)
 
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기
Amazon EMR과 SageMaker를 이용하여 데이터를 준비하고 머신러닝 모델 개발 하기
 
AWS 관리형 서비스를 활용하여 Kubernetes 를 위한 Devops 환경 구축하기 - 김광영, AWS솔루션즈 아키텍트:: AWS S...
AWS 관리형 서비스를 활용하여 Kubernetes 를 위한 Devops 환경 구축하기 - 김광영, AWS솔루션즈 아키텍트::  AWS S...AWS 관리형 서비스를 활용하여 Kubernetes 를 위한 Devops 환경 구축하기 - 김광영, AWS솔루션즈 아키텍트::  AWS S...
AWS 관리형 서비스를 활용하여 Kubernetes 를 위한 Devops 환경 구축하기 - 김광영, AWS솔루션즈 아키텍트:: AWS S...
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기
[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기
[2019] PAYCO 쇼핑 마이크로서비스 아키텍처(MSA) 전환기
 
[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴
 
CI/CD Pipeline Security: Advanced Continuous Delivery Best Practices: Securit...
CI/CD Pipeline Security: Advanced Continuous Delivery Best Practices: Securit...CI/CD Pipeline Security: Advanced Continuous Delivery Best Practices: Securit...
CI/CD Pipeline Security: Advanced Continuous Delivery Best Practices: Securit...
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
보안 사고 예방을 위한 주요 AWS 모범 사례 – 신은수, AWS 보안 담당 솔루션즈 아키텍트:: AWS 온라인 이벤트 – 클라우드 보안 특집
 

Viewers also liked

Viewers also liked (20)

Rest api. barcamp 2013.
Rest api. barcamp 2013.Rest api. barcamp 2013.
Rest api. barcamp 2013.
 
Journey Through the Cloud - Digital Media
Journey Through the Cloud - Digital MediaJourney Through the Cloud - Digital Media
Journey Through the Cloud - Digital Media
 
AWS Webcast - Emergency Preparedness and Interagency Collaboration Webinar
AWS Webcast - Emergency Preparedness and Interagency Collaboration Webinar AWS Webcast - Emergency Preparedness and Interagency Collaboration Webinar
AWS Webcast - Emergency Preparedness and Interagency Collaboration Webinar
 
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
 
AWS Paris Summit 2014 - Closing Keynote Werner Vogels - Beyond the fridge
AWS Paris Summit 2014 - Closing Keynote Werner Vogels - Beyond the fridgeAWS Paris Summit 2014 - Closing Keynote Werner Vogels - Beyond the fridge
AWS Paris Summit 2014 - Closing Keynote Werner Vogels - Beyond the fridge
 
Updating Security Operations for the Cloud - AWS Symposium 2014 - Washington ...
Updating Security Operations for the Cloud - AWS Symposium 2014 - Washington ...Updating Security Operations for the Cloud - AWS Symposium 2014 - Washington ...
Updating Security Operations for the Cloud - AWS Symposium 2014 - Washington ...
 
(SPOT207) State of the Union: AWS Database Services | AWS re:Invent 2014
(SPOT207) State of the Union: AWS Database Services | AWS re:Invent 2014(SPOT207) State of the Union: AWS Database Services | AWS re:Invent 2014
(SPOT207) State of the Union: AWS Database Services | AWS re:Invent 2014
 
AWS Public Sector Symposium | Effective Security Response in the Cloud - Sess...
AWS Public Sector Symposium | Effective Security Response in the Cloud - Sess...AWS Public Sector Symposium | Effective Security Response in the Cloud - Sess...
AWS Public Sector Symposium | Effective Security Response in the Cloud - Sess...
 
AWS Government, Education, and Nonprofits Symposium London, United Kingdom L...
 AWS Government, Education, and Nonprofits Symposium London, United Kingdom L... AWS Government, Education, and Nonprofits Symposium London, United Kingdom L...
AWS Government, Education, and Nonprofits Symposium London, United Kingdom L...
 
AWS Service Drill Downs
AWS Service Drill DownsAWS Service Drill Downs
AWS Service Drill Downs
 
AWS Webcast - Webinar Series for State and Local Government #2: Discover the ...
AWS Webcast - Webinar Series for State and Local Government #2: Discover the ...AWS Webcast - Webinar Series for State and Local Government #2: Discover the ...
AWS Webcast - Webinar Series for State and Local Government #2: Discover the ...
 
Workshop part2 – Big Data
Workshop part2 – Big DataWorkshop part2 – Big Data
Workshop part2 – Big Data
 
Fostering a Culture of Innovation with Cloud
Fostering a Culture of Innovation with CloudFostering a Culture of Innovation with Cloud
Fostering a Culture of Innovation with Cloud
 
(BIZ306) Migrating Trimble Sketchup 3D Warehouse to AWS | AWS re:Invent 2014
(BIZ306) Migrating Trimble Sketchup 3D Warehouse to AWS | AWS re:Invent 2014(BIZ306) Migrating Trimble Sketchup 3D Warehouse to AWS | AWS re:Invent 2014
(BIZ306) Migrating Trimble Sketchup 3D Warehouse to AWS | AWS re:Invent 2014
 
T2 – Continuous integration on aws
T2 – Continuous integration on awsT2 – Continuous integration on aws
T2 – Continuous integration on aws
 
(AFF201) What the Top 50 Games Do with In-App Purchasing That the Rest of Us ...
(AFF201) What the Top 50 Games Do with In-App Purchasing That the Rest of Us ...(AFF201) What the Top 50 Games Do with In-App Purchasing That the Rest of Us ...
(AFF201) What the Top 50 Games Do with In-App Purchasing That the Rest of Us ...
 
Deployment with Elastic Beanstalk at Edinburgh Startup Event
Deployment with Elastic Beanstalk at Edinburgh Startup EventDeployment with Elastic Beanstalk at Edinburgh Startup Event
Deployment with Elastic Beanstalk at Edinburgh Startup Event
 
(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014
(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014
(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014
 
What is Cloud Computing with AWS?
What is Cloud Computing with AWS?What is Cloud Computing with AWS?
What is Cloud Computing with AWS?
 
AWS Webcast - Janet Community Portal to Integrate AWS Cloud Services
AWS Webcast - Janet Community Portal to Integrate AWS Cloud ServicesAWS Webcast - Janet Community Portal to Integrate AWS Cloud Services
AWS Webcast - Janet Community Portal to Integrate AWS Cloud Services
 

Similar to NGINX Plus on AWS

AWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWSAWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWS
Amazon Web Services
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 

Similar to NGINX Plus on AWS (20)

Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS
 
AWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWSAWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWS
 
Svc 202-netflix-open-source
Svc 202-netflix-open-sourceSvc 202-netflix-open-source
Svc 202-netflix-open-source
 
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...
 
re:Invent recap session 2: Being well Architected in the cloud
re:Invent recap session 2: Being well Architected in the cloudre:Invent recap session 2: Being well Architected in the cloud
re:Invent recap session 2: Being well Architected in the cloud
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Being Well Architected in the Cloud
Being Well Architected in the CloudBeing Well Architected in the Cloud
Being Well Architected in the Cloud
 
AWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and ChefAWS migration: getting to Data Center heaven with AWS and Chef
AWS migration: getting to Data Center heaven with AWS and Chef
 
Cloud computing OpenStack_discussion_2014-05
Cloud computing OpenStack_discussion_2014-05Cloud computing OpenStack_discussion_2014-05
Cloud computing OpenStack_discussion_2014-05
 
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
 
Building a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for AnalystsBuilding a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for Analysts
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
 
AWS Best Practices Version 2
AWS Best Practices Version 2AWS Best Practices Version 2
AWS Best Practices Version 2
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Optimising TCO with AWS at Websummit Dublin
Optimising TCO with AWS at Websummit DublinOptimising TCO with AWS at Websummit Dublin
Optimising TCO with AWS at Websummit Dublin
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
 
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
Zero to 1000+ Applications - Large Scale CD Adoption at Cisco with Spinnaker ...
 
AWS Best Practices
AWS Best PracticesAWS Best Practices
AWS Best Practices
 

More from 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
 

More from 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
 

Recently uploaded

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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.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?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
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...
 
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...
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

NGINX Plus on AWS

  • 1. NGINX Plus on AWS Scott Ward— Solutions Architect scotward@amazon.com
  • 2. NGINX on AWS Who is AWS? NGINX – Usage on AWS and best practices © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 3. A broad and deep platform that helps customers build sophisticated, scalable applications © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 4. A Culture of Innovation: Experiment Often & Fail Without Risk
  • 5. Who is using AWS and what are they using it for?
  • 6. Startups on AWS http://aws.amazon.com/solutions/case-studies/
  • 7. Enterprises on AWS http://aws.amazon.com/solutions/case-studies/
  • 8. Foundation Services Infrastructure Storage (Object, Block and Archive) Regions Availability Zones Networking Collaboration and Sharing Security & Access Control Platform Services Databases Relational NoSQL Caching Analytics Hadoop Real-time Data warehouse App Services Queuing Orchestration App streaming Transcoding Email Search Deployment & Management Containers Dev/ops Tools Resource Templates Mobile Services Identity Sync Mobile Analytics Notifications Enterprise Applications Virtual Desktops Data Workflows Usage Tracking Monitoring and Logs Compute (VMs, Auto-scaling and Load Balancing) CDN and Points of Presence
  • 9. 10 regions 26 availability zones 52 edge locations Infrastructure
  • 10. AWS Services Overview Amazon EC2 – Virtual Servers & resizable compute capacity Auto Scaling – Scale compute resources up and down Elastic Load Balancing – Load balancer for compute instances Amazon Elastic Block Storage (EBS) – Block storage for EC2
  • 11. AWS Service Overview AWS Identity and Access Management – AWS Account Access Controls Amazon Route 53 – Scalable Domain Name System Amazon CloudWatch – Resource and Application Monitoring
  • 13. NGINX Who is using NGINX on AWS • Startups, Enterprises, Government Agencies • Example: NASA/JPL Mars Curiosity Mission
  • 16. Installing NGINX Plus on AWS • Launch from AWS Marketplace http://aws.amazon.com/marketplace • Search on “NGINX Plus” – Amazon Linux – Ubuntu • 30 Day Free Trial !! • Launch and Verify – $ /etc/init.d/nginx status
  • 17. NGINX - Security Recommendations Use SSH for accessing your hosts Security Groups to control inbound/outbound traffic Connection Method Control access here Protocol Port Range Source IP or Group Comments HTTP tcp 80-80 CIDR IP Range non-encrypted web traffic HTTPS tcp 443-443 CIDR IP Range encrypted web traffic SSH tcp 22-22 CIDR IP Range ssh access SSH tcp 873-873 CIDR IP Range rsync access SSH udp 5405-5405 CIDR IP Range corosync traffic
  • 18. Load Balancing Behind ELB Route53 hosted zone Elastic Load Balancer region Web App 1 NGINX Plus EC2 instances Web App 2 Web App 3
  • 19. Load Balancing DIY region Web App 1 NGINX Plus AMI Web App 2 Web App 3 Elastic IP
  • 20. Load Balancing DIY Considerations – Being Auto Scaling Aware Command Line Option describe-auto-scaling-instances describe-instances Update NGINX configuration
  • 21. Load Balancing DIY Considerations – Being Auto Scaling Aware SQS and SNS for notifications Current State NGINX Auto Scaling group Amazon SQS Scale up NGINX Auto Scaling group Scale down Amazon SQS Amazon SNS NGINX Auto Scaling group
  • 22. Performance EC2 instance Sizing • Workloads vary – Start small and move up Testing Initial Launch Steady State T2 class M3 General Auto Scaling group Purpose Bigger or More EC2 EC2 EC2 EC2 EC2 EC2 EC2
  • 23. Broad Set of Compute Instance Types… GPU enabled G2 General purpose M3 Memory optimized R3 M2 CR1 Storage and IO optimized Compute optimized C3 C1 CC2 I2 HI1 HS1 M1 CG1 © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
  • 24. Performance Traffic profiles • SSL termination = CPU resources • Lots of small requests = CPU resources • Web Socket = CPU resources • Content Caching = Memory & Instance Storage • Bandwidth Heavy = Horizontal scaling
  • 25. Performance Planning • Determine the right instance profile • Test, Test, Test, Test & Test • Run expected and un-expected traffic patterns against your environment • Analyze results and tweak where needed – Throw away what does not work • Monitor
  • 26. Performance Baselines Performance testing tools – ab – jmeter – http_load – siege – curl-loader – weighttp – httperf – wrk – sslswamp – your favorite tool
  • 27. Performance Baseline Approaches Different Instanc e Different Availability Zon e Different Region NGINX Test Instance region Availability Zone Availability Zone NGINX Test Instance NGINX Test Availability Zone region Instance Availability Zone region
  • 28. High Availability – General Recommendations Use multiple AZs in a region Auto Scaling to help with load change EC2 EC2 region Availability Zone 2 Availability Zone 1 region EC2 EC2 Auto Scaling group Availability Zone 1 EC2 EC2 Auto Scaling group Availability Zone 2 s
  • 29. NGINX High Availability Configuration • Highly available pair of NGINX instances on EC2 with a public IP Address • Active/Passive Configuration • Corosync and Pacemaker for clustering
  • 30. NGINX High Availability Configuration Elastic IP Address Corosync/Pacema ker NGINX EC2 Primary NGINX EC2 Standby
  • 31. NGINX High Availability Configuration Install and config steps • Allocate an Elastic IP address • Create IAM Instance Profile – Assign Elastic IP – Disassociate Elastic IP – EC2 Describe • Launch instances with IAM Instance Profile • Install NGINX HA – $sudo yum install nginx-ha – $sudo apt-get install nginx-ha • Start NGINX HA config on both instances – $ sudo nginx-ha-setup • Answer questions on both instances • Pick a primary • Done!!! Configuration Verification =========== Last updated: Wed Mar 19 02:46:49 2014 Last change: Wed Mar 19 02:46:42 2014 via cibadmin on nginxha101 Stack: openais Current DC: nginxha101 – partition with quorum Version: 1.1.6- 9971ebba4494012a93c03b40a2c58ec0eb60f50c 2 Nodes configured, 2 expected votes 2 Resources configured. ============ Node nginxha100: online ha-ip (ocf::heartbeat:IPaddr2) Started ha-nginx (ocf::nginx-ha:nginx-ha) Started Node nginxha101: online
  • 32. NGINX High Availability Architecture Options Same Region Elastic IP Primary NGINX HA Instance Web App 1 Web App 2 Web App 3 region Availability Zone 1 Failover NGINX HA Instance Web App 1 Web App 2 Web App 3 Availability Zone 2
  • 33. NGINX High Availability Architecture Options Different Regions Region 1 Elastic IP Failover NGINX HA Instance Web App 1 Web App 2 Web App 3 Availability Zone 2 Primary NGINX HA Instance Web App 1 Web App 2 Web App 3 Availability Zone 1 Elastic IP Failover NGINX HA Instance Web App 1 Web App 2 Web App 3 Availability Zone 2 Primary NGINX HA Instance Web App 1 Web App 2 Web App 3 Availability Zone 1 Region 2 Amazon Route53 hosted zone
  • 34. NGINX High Availability Configuration Additional Considerations • Make sure that both NGINX instances are configured the same for their jobs • You get Active/Passive with two instances in cluster – Active/Active or more than two instances?  Corosync and Pacemaker documentation
  • 35. Monitoring Know what is going on with your environment at all times
  • 36. Amazon CloudWatch Default Amazon EC2 metrics CPU Utilization (Percent) Disk Reads (Bytes) Disk Read Operations (Operations) Disk Writes (Bytes) Disk Write Operations (Operations) Network In (Bytes) Network Out (Bytes) Status Check Failed (Count) 1 or 5 minute intervals
  • 37. NGINX Metrics into Amazon CloudWatch status.html  CloudWatch Install Agent $ sudo yum install nginx-cw-agent $ sudo apt-get install nginx-cw-agent
  • 38. NGINX Metrics into Amazon CloudWatch status.html  CloudWatch Update Configuration $ /etc/nginx-cw-agent/nginx-cw-agent.ini [source1] name=exampleorg url=http://example.org/status [source2] name=examplecom url=http://example.com/status http_user=testuser http_pass=testpass
  • 39. NGINX Metrics into Amazon CloudWatch status.html  CloudWatch Start Background Agent Test - $ /usr/bin/nginx-cw-agent.py –f start All in - $ sudo service nginx-cw-agent start View Metrics
  • 40. NGINX with Amazon CloudWatch Logs • Consolidate metrics and alarming for log files from 1 or many instances • Define filters to parse content from your log files • Measure and alarm on specific attributes • Define retention period for your log files EC2 CloudWatch
  • 41. NGINX with Amazon CloudWatch Logs Filter Alarm
  • 42. NGINX with Amazon CloudWatch Logs EC2 EC2 EC2 CloudWatch EC2 EC2 EC2 Capture logs from multiple instances in one place
  • 43. Backup Strategy - Options Protect your configuration • Create an AMI with each new verified config • Snapshot the root volume • Store config files in Amazon S3 or source repository – Deploy via user-data when new Amazon EC2 instance launches • Continuous integration software to build new AMIs with your NGINX configuration
  • 44. Scott Ward— Solutions Architect scotward@amazon.com AWS Pop-Up Loft 925 Market Street http://aws.amazon.com/start-ups/loft/ © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Editor's Notes

  1. What I am talking about here is partly from an upcoming whitepaper around NGINX and its usage on AWS. Going to start with an overview of AWS and who we are. Then jump into NGINX and go into some best practices around architecting on AWS with NGINX, security recommendations, specific NGINX configurations you can use with AWS and AWS product integrations you can achieve with NGINX. I will not be going into any design of our individual services and if they are using NGINX or not.
  2. The broad and deep platform that is AWS. If want to build new businesses from scratch or move some/all workloads to cloud, need a broad array of services and features to make this happen and not have to piecemeal it AWS Platform started in 2006 and it has grown rapidly since that time. Today it is the underlying infrastructure for companies around the world including startups, enterprises, and government agencies. AWS has hundreds of thousands of customers in 190 countries around the world. A little background… After over a decade of building and running the highly scalable web application, Amazon.com, the company realized that it had developed a core competency in operating massive scale technology infrastructure and datacenters, and embarked on a much broader mission of serving a new customer segment—developers and businesses—with a platform of web services they can use to build sophisticated, scalable applications.  AWS is a comprehensive cloud services platform, offering compute power, storage, content delivery, and other functionality that enables businesses to cost-effectively deploy applications and services with greater flexibility, scalability, and reliability. The power of self-service through AWS means you can proactively address your internal plans and react to external demands when you choose and not have to wait for a salesperson to return your call. In response to customer needs and internal innovation on the customer’s behalf, In 2011, we released over 80 significant services and features; in 2012, nearly 160; and in 2013, 280. This trend does not show any sign of slowing.
  3. Experiment Often and fail without risk No time spent on ordering and waiting for infrastructure. Have an idea and try it out. Keep what you need return what you do not IT personnel can focus on more important pieces above the infrastructure or on more important infrastructure needing their attention.
  4. DropBox Pinterest AirBnB Flipboard
  5. Shell Netflix Samsung GE Philips Pfizer Bristol-Myers Squibb Intuit CBA Suncorp
  6. Quick focus on infrastructure because it is a key component that we will be discussing and utilizing throughout this presentation
  7. As you saw from the overall AWS platform and service overview slide there are a lot of services that AWS offers. What I am going to touch base on here are services that are going to be relevant to the rest of the discussion that I will be presenting on. ELB Health Checks AutoScaling Health Checks
  8. Route53- Route to infrastructure inside or outside of AWS * Routing – Latency, Geo, weighted round robin * health checks – DNS Failover. Route 53 monitors endpoint and if there is a failure traffic will be routed to an alternate endpoint
  9. When it comes to NGINX on AWS we see lots of use cases where it is part of the architecture. In the short time that I have been with AWS I hear it referred to regularly as being parts of architectures that people have implemented on AWS. Amazon Linux AMI now has it.
  10. Here is the architecture implemented by NASA/JPL for the Mars Curiosity mission. This comes from the AWS Case Study on the implementation. This architecture represents what was used to support the live video streaming of the rover landing. You will see that they are implementing 100s of EC2 instances running NGINX. In this case they are using it as cache servers for content that they needed to serve up during the live event.
  11. NGINX Plus is available in the AWS Marketplace. AWS Marketplace is an online store that allows you to find software and services that run on the EC2 cloud. Search on NGINX Plus to find the listing of marketplace offerings Go through the launch instance process to get the instances launched with your desired configuration Connect to and verify your instance. This will give you your basic NGINX instance ready to serve up web traffic and give you your baseline for going deeper
  12. Security is a top priority at AWS. We look to keep AWS secure as well as advise our customers on how they can keep themselves secure. Keep SSH restricted even if you open up HTTP and HTTPS. If you are really good at how you deploy you can even get away without using SSH.
  13. ELB Error checking and taking instances out of service. Multiple layers to do health checks on your stack. Route53, ELB, AutoScaling
  14. If you are using your NGINX installation as your primary load balancer and you are serving up traffic to servers that are an in an Auto Scaling group you need to make sure that your NGINX configuration is aware of instances coming and going from your Auto Scaling group.
  15. If you are using your NGINX installation as your primary load balancer and you are serving up traffic to servers that are an in an Auto Scaling group you need to make sure that your NGINX configuration is aware of instances coming and going from your Auto Scaling group.
  16. The T2 instance class is well served for initial testing of configuration and functionality for your deployments. First production deployment can be served by general purpose instances such as m3.medium or m3.large As traffic levels grow you can look to scale up or scale out depending on your needs
  17. SSL termination, lots of small requests or WebSocket are more CPU intensive so you want to be looking at instances that will allow you access to that resource. Content caching is going to be looking to retain as much in memory as well as be able to access disk storage quickly. You will be looking for appropriately sized instance storage as well as memory to hold as much of your content as possible so that you are minimizing disk hits. Bandwidth heavy such as serving files or large downloads – you may find that you are challenged by network bandwidth as a limiting factor and horizontal scaling may be the best option
  18. One of the great benefits of the AWS platform it that is facilitates the ability to experiment various scenarios and then return the infrastructure when you are done. You only pay for what you used during the time that you used the infrastructure. Test out some configurations you think will work for your expected and un-expected traffic patterns and if you are not getting performance that you want try different instance sizes or add more instances. When you are done testing turn off and return what you do not need. Monitoring once you have your desired configuration is critical as it allows you to verify that things are performing optimally as well as allow you to get in front of potential problems. Taking up front time to make sure that you are set up properly will pay benefits in the long run. Unexpected means things like AutoScaling and how you can launch enough instances to cover what you need. It is configurable based on the patterns that you are seeing. Test large traffic rates quickly. Do you need to change your monitoring.
  19. I did some research on web server load testing tools as well as asked around. I got a lot of different answers. End of the day you need to use what you are comfortable with and what allows you to execute the tests that you feel will help you get what you need out of your test.
  20. For your testing it is key that your tests reflect your actual traffic patterns. It is key that your test is executed on a different host so that the testing tool does not conflict with your instance performance or skew metrics. It is next key to test from a different availability zone to help simulate traffic coming from a different location It is next key to test traffic from a different region to help simulate traffic coming from other locations over the public internet
  21. As we dive into some NGINX use cases you will see examples of these recommendations.
  22. In addition to High Availability configuration that you may implement on AWS where you might have NGINX in multiple Azs and using AutoScaling, NGINX also has its own high availability configuration available to handle situations that require it.
  23. Different routing options from Route53. Outline from whitepaper Route 53 latency and round robin options.
  24. Lots of different options that you can employ for your monitoring needs and in the end you are going to choose the one that best suits your needs. There is an opportunity here to utilize CloudWatch as your centralized monitoring for not only what is going on with your EC2 instances that are running NGINX but also your overall NGINX and application environment.
  25. This requires a small agent to be running on your EC2 instance. Either need to use an instance role or provide access keys
  26. CloudWatch logs allows you the ability to capture log files from your instances for further analysis. You could be capturing one log file from one instance or you could be capturing the same log file from many instances in a fleet. Cloudtrail logs gives you the ability to interpret the data in these log files and turn them into CloudWatch metrics. You can view the metrics graphically or create alarms based on the metrics that came from your log files