AWS 강의 정리 (4)

고독한 키쓰차·2022년 7월 1일
0

Cloud

목록 보기
17/21

Elastic Compute Cloud (EC2)

  • Choose your OS, Storage, Memory, Network Throughput. And launch and SSH into your server within minutes.
  • EC2 is resizable compute capacity. (launch new instances)

EC2 - Instance Profile

  • holds a reference to a role (정책을 프로필로 해서 인스턴스에 박음)

EC2 - Placement Groups

  • let you choose the logical placement of your instances to optimize for communication, performance or durability. (free)

  • Clusters : can't be multi-AZ, low latency network performance, high performance computing

  • Partition : spread instances across logical partitions, each partition don't share the underlying hardware with each other, large distributed and replicated workloads

  • Spread : can be multi-AZ, critical instances should be seperate from each other

EC2 - Pricing Model

  • On-Demand : low cost & flexible (can't be interrupted), for short-term
  • Spot : biggest savings, can handle interruptions, should be terminated by AWS to not get charged
  • Reserved : steady-state, Best long-term, can resell, shared between multiple accounts
  • Dedicated : Most Expensive, guarantee of isolate hardware(enterprise requirements)

EC2 - AMI (Amazon Machine Image)

  • Provides the information required to launch an instance

  • can create copies of your servers

  • Launch permissions that control which AWS accounts can use the AMI to launch instances.

  • AMIs are Region Specific

EC2 Auto Scaling Groups

  • Set scaling rules which will automatically launch additional EC2 instance or shutdown instances to meet current demand
  • Contains a collection of EC2 instances that are treated as a group for the purposes of automatic scaling and management.
  • Capacity Settings : Min, max, and desired capacity(ideal)
  • Health Check Type : if there is a sw or hw issue.
  • ELB health check : by pinging an HTTP endpoint
  • Target Scaling Policies : if avg cpu utilization exceeds 75%, then add another server
  • ELB(Elastic Load Balancer) Integration :

Elastic Load Balancer (ELB)

  • 들어오는 데이터를 이제 교통정리해서 뿌려줌 (EC2, lambda 등등)

  • must have at least two AZ

  • cannot go cross-region, only one per region.

  • can be physical hardware or virtual software that accepts incoming traffic to multiple targets.

  • Listeners : Incoming traffic 을 평가함

  • Rules : (no in classic load balancer) listener 들이 평가하는데 따르는 rule

  • Target Groups : (no in CLB)

  • CLB does not allow you to apply rules to listeners

  • Application Load Balancer : is designed to balance HTTP and HTTPS, WAF(Web Application Firewall) can be attached to ALB(Listener, Rules, Target Groups)

  • Network Load Balancer : is designed to balance TCP/UDP, can handle millions of requests per second, can perform Cross-Zone Load Balancing(Listener, Target Groups)

  • Classic Load Balancer : (legacy), can balance HTTP, HTTPS or TCP(not at the same time), will respond with a 504 error(timeout)(Listeners)

  • Sticky Session: specific EC2 instance로 연결, CLB, ALB,(no NLB), useful when specific info is only stored locally on a single instance

  • IPv4 address -> X-Forwared-FOR(XFF)

  • Health Checks : ELB doesn't terminate unhealthy instance, but will just redirect traffic to healthy instances.

  • Cross-zone load balancing : 다른 AZ에서도 나눠서 처리 가능

  • Request Routing : forward of redirect traffic(ALB)

Elastic File System (EFS)

  • Scalable, elastic, cloud-native NFS(Network File System) file system.
  • is a file storage service for EC2 instances.
  • storage capacity grows and shrinks automatically
  • your data is stored across multiple AZs within a region
  • can mount multiple EC2 instance to a single EFS(only in the same VPC)

Elastic Block Store(EBS)

  • virtual hard dist, snapshots are a point-in-time copy of that dist
  • volumes exist on EBs, snapshots exist on S3
  • snapshots only changes when the last snapshot are moved to S3
  • can create AMI from Volumes or snapshot
  • EBS very durable
  • IOPS : Input/output per second, high I/O = lots of small fast reads and writes
  • Throughput : transfer speed(water)
  • Bandwidth : total possible speed of data movement along the network(Pipe)
  • EBS : is a solution for attaching persistent block storage volumes to an EC2 instance, Volumes are automatically replicated within their AZ to protect from component failure.
  • 5 types of EBS : General Purpose, Provisioned IOPS//SSD, Throughput Optimized HDD, Cold HDD, EBS Magnetic//HDD

HDD

-is a magnetic storage that uses rotating platters

  • good at wrtiting a continuously amound of data
  • not great for writing many small reads and writes
  • better for throughput

SSD

  • very good frequently reads and writes
  • no physical moving parts

Moving volumes

  • From one AZ to another : take a snapshot of the volume -> create an AMI from the snapshot -> launch new EC2 instance in desired AZ

  • From one Region to another : take a snapshot of the volume -> create an AMI from the snapshot -> copy the AMI to another region -> launch a new EC2 instance from the copied AMI

Encrypted Root Volume

  • you can encrypt the volume on creation
  • Take a snapshot of the unencrypted volume -> create a copy of the snapshot and select the encryption option -> create a new AMI from the snapshot -> launch a new EC2

EBS vs Instance store volumes

  • EBS Volumes : durable, can attach to a single EC2 instance, created from EBS snapshot, can start and stop instances, data will persist if your reboot your system, ideal for when you want data to persist.
  • Instance Store Volumes : temporary storage, physical attach, is created from a template stored in S3, can't stop instances, only terminate, ideal for temporary backup, such as cache, logs, or other random data
profile
Data Scientist or Gourmet

0개의 댓글