25
1 deep dive into Haid-und-Neu-Str. 18, 76131 Karlsruhe Germany EC2

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

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

[email protected]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

25

Thanks.

msales GmbH

Haid-und-Neu-Str. 18, 76131 Karlsruhe

Germany

[email protected] www.msales.com +49 721 91138 0

follow us @msalestech