SlideShare una empresa de Scribd logo
1 de 65
Descargar para leer sin conexión
November 12, 2014 | Las Vegas, NV
Becky Weiss, Principal Software Engineer, Amazon EC2 Networking
Elastic
network
interface
Subnet A
us-east-1a
10.0.1.0/24
10.0.1.100
Subnet A2
us-east-1a
10.0.2.0/24
10.0.1.101
10.0.2.50
10.0.2.51
Subnet C
us-east-1c
10.0.3.0/24
10.0.3.99
Instance
1
Instance
2
Instance
3 Instance
4
elastic
network
interface
Subnet A
us-east-1a
10.0.1.0/24
10.0.1.100
Subnet A2
us-east-1a
10.0.2.0/24
10.0.1.101
10.0.2.50
10.0.2.51
Subnet C
us-east-1c
10.0.3.0/24
10.0.3.99
Instance
1
Instance
2
Instance
3 Instance
4
Placement group
Subnet A is in us-east-1a
C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id
subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count
2
---------------------------------------------------------------------------------
| RunInstances |
+----------------------------------------+--------------------------------------+
| OwnerId | 123456789012 |
| ReservationId | r-9f5404b5 |
+----------------------------------------+--------------------------------------+
| Instances |
|+-----------------------------------+-----------------------------------------+|
|| AmiLaunchIndex | 0 ||
|| Architecture | x86_64 ||
|| ClientToken | None ||
|| EbsOptimized | False ||
|| Hypervisor | xen ||
|| ImageId | ami-b66ed3de ||
C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id
subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count
2
---------------------------------------------------------------------------------
| RunInstances |
+----------------------------------------+--------------------------------------+
| OwnerId | 123456789012 |
| ReservationId | r-9f5404b5 |
+----------------------------------------+--------------------------------------+
| Instances |
|+-----------------------------------+-----------------------------------------+|
|| AmiLaunchIndex | 0 ||
|| Architecture | x86_64 ||
|| ClientToken | None ||
|| EbsOptimized | False ||
|| Hypervisor | xen ||
|| ImageId | ami-b66ed3de ||
AMI: More about this
choice later…
C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id
subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count
2
---------------------------------------------------------------------------------
| RunInstances |
+----------------------------------------+--------------------------------------+
| OwnerId | 123456789012 |
| ReservationId | r-9f5404b5 |
+----------------------------------------+--------------------------------------+
| Instances |
|+-----------------------------------+-----------------------------------------+|
|| AmiLaunchIndex | 0 ||
|| Architecture | x86_64 ||
|| ClientToken | None ||
|| EbsOptimized | False ||
|| Hypervisor | xen ||
|| ImageId | ami-b66ed3de ||
Big instance type:
c3.8xlarge
Avg: 0.167msec
NetworkingTestPlacementGroup available cluster
C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id
subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count
2 --placement GroupName=NetworkingTestPlacementGroup
---------------------------------------------------------------------------------
| RunInstances |
+----------------------------------------+--------------------------------------+
| OwnerId | 123456789012 |
| ReservationId | r-13374839 |
+----------------------------------------+--------------------------------------+
| Instances |
|+-----------------------------------+-----------------------------------------+|
|| AmiLaunchIndex | 0 ||
|| Architecture | x86_64 ||
|| ClientToken | None ||
|| EbsOptimized | False ||
|| Hypervisor | xen ||
|| ImageId | ami-b66ed3de ||
Avg: .099msec
Instance 1 Instance 2
...........
Virtualization layer
eth0
eth1
Instance Virtual NICs
Physical NIC
Virtualization layer
eth0
Instance
Physical NIC
VF Driver
eth1
VF
[ec2-user@ip-10-0-3-70 ~]$
ethtool -i eth0
driver: vif
version:
firmware-version:
bus-info: vif-0
…
[ec2-user@ip-10-0-3-70 ~]$
ethtool -i eth0
driver: ixgbevf
version: 2.14.2+amzn
firmware-version: N/A
bus-info: 0000:00:03.0
…
amzn-ami-hvm-2012.03.1.x86_64-ebs
hvm
--attribute
sriovNetSupport
InstanceId i-37c5d1d9
Not yet!
[ec2-user@ip-10-0-3-125 ~]$ sudo yum update
OS update
reboot-instances
Reboot
(OS update)
(Not shown here: analogous steps for other Linux distros)
Add to Windows driver store
stop-instances
Stop the instance
stop-instances
--sriov-net-support
simple
Enable SRIOV
Cannot be undone
start-instances
Start
start-instances
--attribute
sriovNetSupport
InstanceId i-37c5d1d9
Value simple
We’re on
 modinfo ixgbevf
 aws ec2 register-image
--name MyEnhancedNetworkingImage
--image-location …
--sriov-net-support-simple
i2.8xlarge
Storage-optimized instance
require 'mongo‘
'randomdb'
until Time SECONDS_TO_RUN
KEY_MAX
:key
Time
if
:times_accessed
:key
else
:key :value
:times_accessed
end
Time
end
Spin in tight loop:
Read a random document
Then write it back
def add_write_statistic
:sample_count
:sum
:minimum :minimum
:maximum :maximum
end
Aggregating statistics for CloudWatch
require 'aws-sdk'
AWS CloudWatch Client
if Time
:namespace 'NetworkingTest/MongoDemo',
:metric_data => [{:metric_name => 'WriteTime',
:dimensions => [{:name => 'RunId', :value => MY_RUN_ID}],
:statistic_values => write_stats}],
:unit => 'Seconds'
Time
:sample_count :sum
end
CloudWatch PutMetricData:
Writing a custom metric
# ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 --
group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data-
file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10
RESERVATION r-d13d6f37 123456789012
INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal
pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000
us-east-1a monitoring-pending 10.0.1.113
vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm
xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance-
profile/NetworkingTestIAMRole
NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113
true
NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800
true
GROUP sg-72caf017 default
...
# ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 --
group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data-
file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10
RESERVATION r-d13d6f37 123456789012
INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal
pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000
us-east-1a monitoring-pending 10.0.1.113
vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm
xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance-
profile/NetworkingTestIAMRole
NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113
true
NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800
true
GROUP sg-72caf017 default
...
CloudWatch detailed monitoring:
1-minute metrics
# ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 --
group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data-
file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10
RESERVATION r-d13d6f37 123456789012
INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal
pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000
us-east-1a monitoring-pending 10.0.1.113
vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm
xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance-
profile/NetworkingTestIAMRole
NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113
true
NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800
true
GROUP sg-72caf017 default
...
Startup script file
# cat startup_script.sh
Download client test script from S3
Then gogogo!
# ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 --
group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data-
file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10
RESERVATION r-d13d6f37 123456789012
INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal
pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000
us-east-1a monitoring-pending 10.0.1.113
vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm
xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance-
profile/NetworkingTestIAMRole
NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113
true
NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800
true
GROUP sg-72caf017 default
...
Security best practice:
Launch instances with IAM roles if
they need to access any AWS
resources
# aws iam list-role-policies --role-name NetworkingTestIAMRole
{
"PolicyNames": [
"NetworkingTestIAMRole-CloudWatchPolicy",
"NetworkingTestIAMRole-S3Policy"
]
}
# aws iam get-role-policy --role-name NetworkingTestIAMRole --policy-name NetworkingTestIAMRole-S3Policy
Allow retrieving objects from a particular S3 bucket
# aws iam get-role-policy --role-name NetworkingTestIAMRole --policy-name NetworkingTestIAMRole-
CloudWatchPolicy
Allow CloudWatch PutMetricData
Label WriteTime
389483.0 2014-10-29T02:30:00Z Seconds
390189.0 2014-10-29T02:33:00Z Seconds
392373.0 2014-10-29T02:34:00Z Seconds
392387.0 2014-10-29T02:32:00Z Seconds
377256.0 2014-10-29T02:31:00Z Seconds
SampleCount statistic:
How many of these WriteTime statistics
were written across all instances during
each minute?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
“WriteTime” SampleCount statistic
by number of client instances
TPS, regular TPS, enhanced
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
DiskWriteBytes 1-minute Sum statistic
by number of client instances
Regular Enhanced
Placement group
Instance
Virtualization layer
VF driver
http://bit.ly/awsevals

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
 
A fun cup of joe with open liberty
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
 
OpenStack networking-sfc flow 분석
OpenStack networking-sfc flow 분석OpenStack networking-sfc flow 분석
OpenStack networking-sfc flow 분석
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay NetworksDeep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
 
How deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performanceHow deep is your buffer – Demystifying buffers and application performance
How deep is your buffer – Demystifying buffers and application performance
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
 
Hyperledger composer
Hyperledger composerHyperledger composer
Hyperledger composer
 
Known basic of NFV Features
Known basic of NFV FeaturesKnown basic of NFV Features
Known basic of NFV Features
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 
Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019Kubernetes the Very Hard Way. Velocity Berlin 2019
Kubernetes the Very Hard Way. Velocity Berlin 2019
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes 青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016
 
[233] level 2 network programming using packet ngin rtos
[233] level 2 network programming using packet ngin rtos[233] level 2 network programming using packet ngin rtos
[233] level 2 network programming using packet ngin rtos
 
Understanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and RaftUnderstanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and Raft
 
IxVM on CML
IxVM on CMLIxVM on CML
IxVM on CML
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
 
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterLISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
 
How To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesHow To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - Slides
 

Destacado

Intro to OpenStack - WAJUG
Intro to OpenStack - WAJUGIntro to OpenStack - WAJUG
Intro to OpenStack - WAJUG
Kevin Jackson
 
AWS Network Topology/Architecture
AWS Network Topology/ArchitectureAWS Network Topology/Architecture
AWS Network Topology/Architecture
wlscaudill
 

Destacado (8)

Intro to OpenStack - WAJUG
Intro to OpenStack - WAJUGIntro to OpenStack - WAJUG
Intro to OpenStack - WAJUG
 
(ARC401) Black-Belt Networking for the Cloud Ninja | AWS re:Invent 2014
(ARC401) Black-Belt Networking for the Cloud Ninja | AWS re:Invent 2014(ARC401) Black-Belt Networking for the Cloud Ninja | AWS re:Invent 2014
(ARC401) Black-Belt Networking for the Cloud Ninja | AWS re:Invent 2014
 
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
 
AWS Network Topology/Architecture
AWS Network Topology/ArchitectureAWS Network Topology/Architecture
AWS Network Topology/Architecture
 
Selecting the Best VPC Network Architecture (CPN208) | AWS re:Invent 2013
Selecting the Best VPC Network Architecture (CPN208) | AWS re:Invent 2013Selecting the Best VPC Network Architecture (CPN208) | AWS re:Invent 2013
Selecting the Best VPC Network Architecture (CPN208) | AWS re:Invent 2013
 
AWS re:Invent 2016: Extending Datacenters to the Cloud: Connectivity Options ...
AWS re:Invent 2016: Extending Datacenters to the Cloud: Connectivity Options ...AWS re:Invent 2016: Extending Datacenters to the Cloud: Connectivity Options ...
AWS re:Invent 2016: Extending Datacenters to the Cloud: Connectivity Options ...
 
AWS re:Invent 2016: AWS Database State of the Union (DAT320)
AWS re:Invent 2016: AWS Database State of the Union (DAT320)AWS re:Invent 2016: AWS Database State of the Union (DAT320)
AWS re:Invent 2016: AWS Database State of the Union (DAT320)
 
DataCenter:: Infrastructure Presentation
DataCenter:: Infrastructure PresentationDataCenter:: Infrastructure Presentation
DataCenter:: Infrastructure Presentation
 

Similar a (SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014

Similar a (SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014 (20)

(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private Cloud
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private Cloud
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
Open stack advanced_part
Open stack advanced_partOpen stack advanced_part
Open stack advanced_part
 
Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)
 
See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...See what happened with real time kvm when building real time cloud pezhang@re...
See what happened with real time kvm when building real time cloud pezhang@re...
 
Understanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeUnderstanding kube proxy in ipvs mode
Understanding kube proxy in ipvs mode
 
How to debug ocfs2 hang problem
How to debug ocfs2 hang problemHow to debug ocfs2 hang problem
How to debug ocfs2 hang problem
 
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/StableSR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
 
Software Defined Networks
Software Defined NetworksSoftware Defined Networks
Software Defined Networks
 
Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)Deep Dive - Amazon Virtual Private Cloud (VPC)
Deep Dive - Amazon Virtual Private Cloud (VPC)
 
My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...My old security advisories on HMI/SCADA and industrial software released betw...
My old security advisories on HMI/SCADA and industrial software released betw...
 
Windows Attacks AT is the new black
Windows Attacks   AT is the new blackWindows Attacks   AT is the new black
Windows Attacks AT is the new black
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
Vyos clustering ipsec
Vyos clustering ipsecVyos clustering ipsec
Vyos clustering ipsec
 
SAS (Secure Active Switch)
SAS (Secure Active Switch)SAS (Secure Active Switch)
SAS (Secure Active Switch)
 

Más de Amazon Web Services

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

Más de Amazon Web Services (20)

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

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
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
 
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...
 
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
 

(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014

  • 1. November 12, 2014 | Las Vegas, NV Becky Weiss, Principal Software Engineer, Amazon EC2 Networking
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 11. elastic network interface Subnet A us-east-1a 10.0.1.0/24 10.0.1.100 Subnet A2 us-east-1a 10.0.2.0/24 10.0.1.101 10.0.2.50 10.0.2.51 Subnet C us-east-1c 10.0.3.0/24 10.0.3.99 Instance 1 Instance 2 Instance 3 Instance 4 Placement group
  • 12. Subnet A is in us-east-1a
  • 13. C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count 2 --------------------------------------------------------------------------------- | RunInstances | +----------------------------------------+--------------------------------------+ | OwnerId | 123456789012 | | ReservationId | r-9f5404b5 | +----------------------------------------+--------------------------------------+ | Instances | |+-----------------------------------+-----------------------------------------+| || AmiLaunchIndex | 0 || || Architecture | x86_64 || || ClientToken | None || || EbsOptimized | False || || Hypervisor | xen || || ImageId | ami-b66ed3de ||
  • 14. C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count 2 --------------------------------------------------------------------------------- | RunInstances | +----------------------------------------+--------------------------------------+ | OwnerId | 123456789012 | | ReservationId | r-9f5404b5 | +----------------------------------------+--------------------------------------+ | Instances | |+-----------------------------------+-----------------------------------------+| || AmiLaunchIndex | 0 || || Architecture | x86_64 || || ClientToken | None || || EbsOptimized | False || || Hypervisor | xen || || ImageId | ami-b66ed3de || AMI: More about this choice later…
  • 15. C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count 2 --------------------------------------------------------------------------------- | RunInstances | +----------------------------------------+--------------------------------------+ | OwnerId | 123456789012 | | ReservationId | r-9f5404b5 | +----------------------------------------+--------------------------------------+ | Instances | |+-----------------------------------+-----------------------------------------+| || AmiLaunchIndex | 0 || || Architecture | x86_64 || || ClientToken | None || || EbsOptimized | False || || Hypervisor | xen || || ImageId | ami-b66ed3de || Big instance type: c3.8xlarge
  • 16.
  • 19.
  • 20. C:> aws ec2 run-instances --image-id ami-b66ed3de --instance-type c3.8xlarge --subnet-id subnet-c03cfb99 --security-group-ids sg-72caf017 --key-name NetworkingTestSSHKey --count 2 --placement GroupName=NetworkingTestPlacementGroup --------------------------------------------------------------------------------- | RunInstances | +----------------------------------------+--------------------------------------+ | OwnerId | 123456789012 | | ReservationId | r-13374839 | +----------------------------------------+--------------------------------------+ | Instances | |+-----------------------------------+-----------------------------------------+| || AmiLaunchIndex | 0 || || Architecture | x86_64 || || ClientToken | None || || EbsOptimized | False || || Hypervisor | xen || || ImageId | ami-b66ed3de ||
  • 22.
  • 23.
  • 24.
  • 25. Instance 1 Instance 2 ...........
  • 28.
  • 29.
  • 30. [ec2-user@ip-10-0-3-70 ~]$ ethtool -i eth0 driver: vif version: firmware-version: bus-info: vif-0 … [ec2-user@ip-10-0-3-70 ~]$ ethtool -i eth0 driver: ixgbevf version: 2.14.2+amzn firmware-version: N/A bus-info: 0000:00:03.0 …
  • 31.
  • 32.
  • 35. [ec2-user@ip-10-0-3-125 ~]$ sudo yum update OS update
  • 36. reboot-instances Reboot (OS update) (Not shown here: analogous steps for other Linux distros)
  • 37.
  • 38. Add to Windows driver store
  • 43.
  • 44.  modinfo ixgbevf  aws ec2 register-image --name MyEnhancedNetworkingImage --image-location … --sriov-net-support-simple
  • 45.
  • 47. require 'mongo‘ 'randomdb' until Time SECONDS_TO_RUN KEY_MAX :key Time if :times_accessed :key else :key :value :times_accessed end Time end Spin in tight loop: Read a random document Then write it back
  • 48. def add_write_statistic :sample_count :sum :minimum :minimum :maximum :maximum end Aggregating statistics for CloudWatch
  • 49. require 'aws-sdk' AWS CloudWatch Client if Time :namespace 'NetworkingTest/MongoDemo', :metric_data => [{:metric_name => 'WriteTime', :dimensions => [{:name => 'RunId', :value => MY_RUN_ID}], :statistic_values => write_stats}], :unit => 'Seconds' Time :sample_count :sum end CloudWatch PutMetricData: Writing a custom metric
  • 50. # ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 -- group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data- file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10 RESERVATION r-d13d6f37 123456789012 INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000 us-east-1a monitoring-pending 10.0.1.113 vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance- profile/NetworkingTestIAMRole NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113 true NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800 true GROUP sg-72caf017 default ...
  • 51. # ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 -- group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data- file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10 RESERVATION r-d13d6f37 123456789012 INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000 us-east-1a monitoring-pending 10.0.1.113 vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance- profile/NetworkingTestIAMRole NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113 true NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800 true GROUP sg-72caf017 default ... CloudWatch detailed monitoring: 1-minute metrics
  • 52. # ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 -- group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data- file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10 RESERVATION r-d13d6f37 123456789012 INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000 us-east-1a monitoring-pending 10.0.1.113 vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance- profile/NetworkingTestIAMRole NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113 true NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800 true GROUP sg-72caf017 default ... Startup script file
  • 53. # cat startup_script.sh Download client test script from S3 Then gogogo!
  • 54. # ec2-run-instances ami-b66ed3de --instance-type c3.large --subnet subnet-c03cfb99 -- group sg-72caf017 --placement-group NetworkingTestPlacementGroup --monitor --user-data- file my_startup_script.sh --iam-profile NetworkingTestIAMRole --instance-count 10 RESERVATION r-d13d6f37 123456789012 INSTANCE i-fb6d5352 ami-b66ed3de ip-10-0-1-113.ec2.internal pending NetworkingTestSSHKey 0 c3.large 2014-10-30T13:26:33+0000 us-east-1a monitoring-pending 10.0.1.113 vpc-ca28afaf subnet-c03cfb99 ebs NetworkingTestPlacementGroup hvm xen sg-72caf017 defaultfalse arn:aws:iam::123456789012:instance- profile/NetworkingTestIAMRole NIC eni-b560caed subnet-c03cfb99 vpc-ca28afaf 123456789012 in-use 10.0.1.113 true NICATTACHMENT eni-attach-fb6ddf9d 0 attaching 2014-10-30T06:26:33-0800 true GROUP sg-72caf017 default ... Security best practice: Launch instances with IAM roles if they need to access any AWS resources
  • 55. # aws iam list-role-policies --role-name NetworkingTestIAMRole { "PolicyNames": [ "NetworkingTestIAMRole-CloudWatchPolicy", "NetworkingTestIAMRole-S3Policy" ] }
  • 56. # aws iam get-role-policy --role-name NetworkingTestIAMRole --policy-name NetworkingTestIAMRole-S3Policy Allow retrieving objects from a particular S3 bucket
  • 57. # aws iam get-role-policy --role-name NetworkingTestIAMRole --policy-name NetworkingTestIAMRole- CloudWatchPolicy Allow CloudWatch PutMetricData
  • 58. Label WriteTime 389483.0 2014-10-29T02:30:00Z Seconds 390189.0 2014-10-29T02:33:00Z Seconds 392373.0 2014-10-29T02:34:00Z Seconds 392387.0 2014-10-29T02:32:00Z Seconds 377256.0 2014-10-29T02:31:00Z Seconds SampleCount statistic: How many of these WriteTime statistics were written across all instances during each minute?
  • 59. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 “WriteTime” SampleCount statistic by number of client instances TPS, regular TPS, enhanced
  • 60. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 DiskWriteBytes 1-minute Sum statistic by number of client instances Regular Enhanced
  • 61.
  • 64.