deep dive into ec2 - msalesdevops engineer @msales lots of aws, lots of ansible i go fishing i have...
TRANSCRIPT
![Page 1: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/1.jpg)
1
deep dive into
Haid-und-Neu-Str. 18, 76131 Karlsruhe Germany
EC2
![Page 2: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/2.jpg)
2
DevOps Engineer @msales
lots of aws, lots of ansible
I go fishing
I have two children (less time to go fishing, but still fun)
I play The Legend of Zelda
I'm not a layout professional
Twitter: @witsches, @msalestech
David Heidt
about meyes, I caught this myself
![Page 3: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/3.jpg)
3
ec2
![Page 4: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/4.jpg)
4
ec2 = elastic compute cloud
launch virtual servers when you need them
run them as long as you need them
terminate when you don't need them anymore
or stop them and pay less
![Page 5: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/5.jpg)
5
![Page 6: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/6.jpg)
6
instance types
t = general purpose m = general purpose c = compute optimized r = memory optimized g = GPU i = high I/O storage optimized d = dense storage optimized
c3.xlarge
nano micro small medium large xlarge 2xlarge 4xlarge 8xlarge
2 3 4
family generationsize
![Page 7: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/7.jpg)
7
t != mgeneral purpose, but different
t-instances come with burstable performance & cpu credits
IRL t-instances are ideal because they are slim & keen
even eligible for free usage tier
t stops at large, m starts at large (so there is no real competition)
![Page 8: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/8.jpg)
8
instance launch details
shutdown behaviour: stop|terminate
termination protection
Tenancy
detailled Monitoring
user data
![Page 9: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/9.jpg)
9
instance storage
ebs: magnetic, gp, provisioned iops
ebs snapshots
ebs performance relates to instance network perfromance
ephemeral
instances of the i-family
![Page 10: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/10.jpg)
10
amis and the marketplace
Amazon provides common basic images
for everything else there are:
community amis
marketplace amis
make your own ami
![Page 11: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/11.jpg)
11
pv vs hvm
HVM takes advantage of Intel VT-x technology
HVM machines run their own kernel
IN PV, Application must go through VMM
HVM is therefore usually a bit faster
PV may be more secure in some cases
![Page 12: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/12.jpg)
12
instance networking
launch multiple interfaces on an instance ixgbevf driver, enhanced networking
• higher performance (packets per second), lower latency, and lower jitter • not on all OSs available • not on all instances available • check with ethtool -i <interface>
![Page 13: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/13.jpg)
13
locating the instances
global presence
multiple AZs/datacenters per region
placement groups
![Page 14: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/14.jpg)
14
so how does payment work?
on the fly instances
spot instances
reserved instances
dedicated hosts
Use the calculator, Luke!
![Page 15: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/15.jpg)
15
other ec2 components
![Page 16: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/16.jpg)
16
elb (elastic load balancer)
http or TCP loadbalancer
SSL termination
HA
Health checking of backends
cross -AZ
![Page 17: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/17.jpg)
17
auto scaling
launch or terminate instances based on cloudwatch metrics
integrates smoothly with elb
react to impacts while being asleep
![Page 18: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/18.jpg)
18
vpc
![Page 19: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/19.jpg)
19
VPC = virtual private cloud
public ips
elastic IPs
peering
endpoints (currently s3 only)
VPN connection to VPCs
is a separate product, but ec2 usage makes no sense without knowing about VPC
![Page 20: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/20.jpg)
20
security groups
filter traffic on IP layer
relate to other security groups (within VPC)
instances can have multiple security groups
once the name of a group is set, it cannot be changed ;)
![Page 21: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/21.jpg)
21
what else?
![Page 22: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/22.jpg)
22
cloudwatch
metrics
custom metrics
alarms
autoscaling actions
![Page 23: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/23.jpg)
23
ecs = elastic container service
deploy containers to ec2
usually docker
no extra cost, standard ec2 charges apply
![Page 24: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/24.jpg)
24
hints for ec2 in production
use the aws cli/api or config management!
every instance is replaceable
always start with elastic IPs if you have static services
if you want to scale, keep an eye on your account limits
re-use security groups and name them accordingly
make your own amis
is a separate product, but ec2 usage makes no sense without knowing about VPC
![Page 25: deep dive into EC2 - msalesDevOps Engineer @msales lots of aws, lots of ansible I go fishing I have two children (less time to go fishing, but still fun) I play The Legend of Zelda](https://reader033.vdocuments.mx/reader033/viewer/2022041618/5e3d2ad4b5a9cc06d426fc6e/html5/thumbnails/25.jpg)
25
Thanks.
msales GmbH
Haid-und-Neu-Str. 18, 76131 Karlsruhe
Germany
[email protected] www.msales.com +49 721 91138 0
follow us @msalestech