0%

๐Ÿ† LabGuide - AWS Global Accelerator

์ž‘์„ฑ์ž : ongja.cloudnet@


AWS Global Accelerator ์ฐธ๊ณ  ๋งํฌ

Global Accelerator ๊ฐœ์š”
Global Accelertor ์†Œ๊ฐœ (AWS ํ•œ๊ตญ ๋ธ”๋กœ๊ทธ)
Global Accelerator Developer Guide (์„ค๋ช…์„œ)
Traffic management with AWS Global Accelerator
Global Accelerator ์š”๊ธˆ


๐Ÿ’ก AWS ์„œ๋น„์Šค ๊ด€๋ จํ•ด์„œ๋Š” ํ•ญ์ƒ ์ตœ์šฐ์„ ์œผ๋กœ โ€˜AWS ์„ค๋ช…์„œโ€™๋ฅผ ์ฝ์–ด๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค.
ํ•œ๊ธ€ ๋ฒˆ์—ญ์ด ๋งค๋„๋Ÿฝ์ง€ ๋ชปํ•˜๋ฉด English ๋กœ ๋ณ€๊ฒฝ ํ›„ ์ฝ์–ด๋ณด๊ธธ ๋ฐ”๋ž€๋‹ค.



1. AWS Global Accelerator Theory


1.1 AWS Global Accelerator ๋ž€?

  • AWS Global Accelerator๋Š” ๋กœ์ปฌ ๋˜๋Š” ๊ธ€๋กœ๋ฒŒ ์‚ฌ์šฉ์ž๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ฐ€์šฉ์„ฑ๊ณผ ์„ฑ๋Šฅ์„ ๊ฐœ์„ ํ•˜๋Š” ์„œ๋น„์Šค์ด๋‹ค.
  • AWS Global Accelerator๋Š” AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ์ž์—์„œ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์œผ๋กœ ์ด์–ด์ง„ ๊ฒฝ๋กœ๋ฅผ ์ตœ์ ํ™”ํ•˜์—ฌ ํŠธ๋ž˜ํ”ฝ์˜ ์„ฑ๋Šฅ์„ ๊ฐœ์„ ํ•œ๋‹ค.

1.2 AWS Global Accelerator Key Words

  • ๊ณ ์ • Anycast IP โ€“ AWS Global Accelerator๋Š” ํ•˜๋‚˜ ์ด์ƒ์˜ AWS ๋ฆฌ์ „์—์„œ ํ˜ธ์ŠคํŒ…๋˜๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ๋Œ€ํ•œ ๊ณ ์ • ์ง„์ž…์  ์—ญํ• ์„ ํ•˜๋Š” ์ •์  IP ์ฃผ์†Œ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ์ด IP ์ฃผ์†Œ๋Š” AWS ์—ฃ์ง€ ๋กœ์ผ€์ด์…˜์—์„œ ํ• ๋‹น๋˜๋Š” Anycast์ž…๋‹ˆ๋‹ค. ์ฆ‰, ์ด IP ์ฃผ์†Œ๊ฐ€ ์—ฌ๋Ÿฌ AWS ์—ฃ์ง€ ๋กœ์ผ€์ด์…˜์—์„œ ๋ฐœํ‘œ๋˜๋ฏ€๋กœ ํŠธ๋ž˜ํ”ฝ์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ์ตœ๋Œ€ํ•œ ๊ฐ€๊นŒ์šด ์œ„์น˜์—์„œ AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ์— ์ง„์ž…ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • AWS์˜ ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ โ€“ AWS Global Accelerator๋ฅผ ํ†ตํ•ด ๋ผ์šฐํŒ…๋˜๋Š” ํŠธ๋ž˜ํ”ฝ์€ ๊ณต์šฉ ์ธํ„ฐ๋„ท์ด ์•„๋‹ˆ๋ผ AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ๋”ฐ๋ผ ์ด๋™ํ•œ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” ํด๋ผ์ด์–ธํŠธ ์œ„์น˜, ์ƒํƒœ ๊ฒ€์‚ฌ ๊ฒฐ๊ณผ ๋ฐ ๊ตฌ์„ฑ๋œ ๊ฐ€์ค‘์น˜์— ๋”ฐ๋ผ ์ตœ์ ์˜ ๋ฆฌ์ „์œผ๋กœ ๋ผ์šฐํŒ…๋œ๋‹ค.

  • ํด๋ผ์ด์–ธํŠธ ์ƒํƒœ โ€“ AWS Global Accelerator๋ฅผ ํ™œ์šฉํ•˜๋ฉด ํ•„์ˆ˜ ์š”๊ฑด์œผ๋กœ ์ƒํƒœ๋ฅผ ์ €์žฅํ•˜๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ์ƒํƒœ ์ €์žฅ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ์ดˆ๊ธฐ ์—ฐ๊ฒฐ ํ›„์— ๋™์ผํ•œ EndPoint๋กœ ์‚ฌ์šฉ์ž๋ฅผ ๋ผ์šฐํŒ…ํ•œ๋‹ค. AWS Global Accelerator๋Š” ์ด๋ฅผ ์œ„ํ•ด ํฌํŠธ์™€ ํ”„๋กœํ† ์ฝœ์— ๊ด€๊ณ„์—†์ด ํด๋ผ์ด์–ธํŠธ ์š”์ฒญ์ž์˜ Source IP ์ƒํƒœ ์œ ์ง€๋ฅผ ์œ„ํ•œ ์‹๋ณ„์ž๋กœ ์„ค์ •ํ•œ๋‹ค.

  • AWS Global Accelerator ๊ตฌ์„ฑ

    • Listener โ€“ ํ”„๋กœํ† ์ฝœ๊ณผ ํฌํŠธ๋ฅผ ๊ธฐ๋ฐ˜ํ•˜์—, AWS Global Accelerator๋กœ ์ธ๋ฐ”์šด๋“œ ์—ฐ๊ฒฐ์„ ์ฒ˜๋ฆฌํ•˜๋Š” Listener๋ฅผ ๊ตฌ์„ฑ

    • EndPoint Group โ€“ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋ฐฐํฌ๋˜๋Š” AWS ๋ฆฌ์ „์„ ์ •์˜

    • Traffic Dial โ€“ EndPoint Group์ด ์ˆ˜์‹  ํ•  ์ˆ˜์žˆ๋Š” ํŠธ๋ž˜ํ”ฝ์˜ ๋น„์œจ์„ ์˜๋ฏธ

    • EndPoint โ€“ EndPoint Group์— ์—ฐ๊ฒฐ๋œ EC2-Instance, Elastic IP, Network Load Balancer ๋˜๋Š” Application Load Balancer์ด๋‹ค.

    • EndPoint Weight โ€“ ๋‹ค์ˆ˜์˜ EndPoint๊ฐ€ ์žˆ๋Š” EndPoint Group์—์„œ ๊ฐ€์ค‘์น˜๋ฅผ ๋ถ€์—ฌํ•˜์—ฌ ๋ถ„๋ฐฐ


1.3 AWS Global Accelerator ์ž‘๋™ ๋ฐฉ์‹

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled.png
๊ทธ๋ฆผ 1-1 AWS Global Accelerator Diagram

  • Edge Location์—์„œ ์•Œ๋ฆฌ๋Š” 2๊ฐœ์˜ ๊ณ ์ • Anycast IP ์ฃผ์†Œ๋ฅผ ํ†ตํ•ด, ์‚ฌ์šฉ์ž์—๊ฒŒ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด Edge Location์œผ๋กœ ํŠธ๋ž˜ํ”ฝ์ด ์ „์†ก๋œ๋‹ค.
  • AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด AWS Global Accelerator๋กœ ์š”์ฒญ์ด ๋ผ์šฐํŒ…๋˜๋ฉด, ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ์ •์ƒ ์ƒํƒœ์˜ EndPoint Group์„ ์„ ํƒํ•˜์—ฌ ์„œ๋น„์Šค ํ•œ๋‹ค.

๐Ÿ’ก AWS Global Accelerator์˜ ํ•ต์‹ฌ์€ ๊ณ ์ • Anycast IP์„ ์ œ๊ณตํ•˜์—ฌ ์‚ฌ์šฉ์ž ์ž…์žฅ์—์„œ ๊ณ ์ • IP ์ฃผ์†Œ๋กœ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜๋ฉฐ, AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ฒฝ์œ ํ•˜์—ฌ ์•ˆ์ •์ ์ด๊ณ  ๋น ๋ฅธ ์„œ๋น„์Šค๊ฐ€ ๊ฐ€๋Šฅํ•˜๋Š” ์ ์ด๋‹ค.



2. AWS Global Accelerator Lab Preview


2.1 Lab Topology

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%201.png

๊ทธ๋ฆผ 2-1 AWS Global Accelerator Lab Topology

  • ์‹œ๋“œ๋‹ˆ, ์ƒํŒŒ์šธ๋ฃจ Region์— Web ์„œ๋ฒ„์šฉ EC2-Instance 2๋Œ€์”ฉ ๋ฐฐ์น˜
  • Global Accelerator์—์„œ HTTP ์„œ๋น„์Šค์˜ ์ธ๋ฐ”์šด๋“œ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ Listener๋ฅผ ๊ตฌ์„ฑํ•˜๊ณ , 2๊ฐœ์˜ Anycast IP๋ฅผ ํ• ๋‹น
  • Global Accelerator์—์„œ ์‹œ๋“œ๋‹ˆ, ์ƒํŒŒ์šธ๋ฃจ Region์— ๋Œ€ํ•œ EndPoint Group์„ ๊ตฌ๋ถ„
  • EndPoint Group์˜ EndPoint ์ง€์ • (์‹œ๋“œ๋‹ˆ : ALB, ์ƒํŒŒ์šธ๋ฃจ : EC2-Instance 2๋Œ€)
  • ์„œ์šธ, ๋ฒ„์ง€๋‹ˆ์•„ Region์— Client๋ฅผ ํ†ตํ•ด ์ƒ์„ฑ๋œ Anycast IP๋กœ Web ์ ‘๊ทผํ•˜์—ฌ ๋™์ž‘ ํ™•์ธ

2.2 AWS ๊ธฐ๋ณธ ์„ค์ •

  • ๋ณธ ์‹ค์Šต์—์„œ ํ™œ์šฉํ•  AWS Region์€ ์„œ์šธ, ๋ฒ„์ง€๋‹ˆ์•„๋ถ๋ถ€, ์‹œ๋“œ๋‹ˆ, ์ƒํŒŒ์šธ๋ฃจ ์ด๋‹ค. ํ•ด๋‹น Region์— ๋Œ€ํ•œ EC2-Key Pair๋ฅผ ์ƒ์„ฑ
  • ์„œ์šธ, ๋ฒ„์ง€๋‹ˆ์•„๋ถ๋ถ€ Region์€ ํด๋ผ์ด์–ธํŠธ ์˜์—ญ์œผ๋กœ, ์‹ค์Šต์šฉ EC2-Instance๋ฅผ 1๋Œ€์”ฉ ๊ตฌ์ถ• (Default VPC ๋‚ด EC2-Instance ์ƒ์„ฑ)
  • ์‹œ๋“œ๋‹ˆ, ์ƒํŒŒ์šธ๋ฃจ Region์€ ์„œ๋น„์Šค ์˜์—ญ์œผ๋กœ, CloudFormation์— ์˜ํ•ด ์ธํ”„๋ผ๋ฅผ ์ž๋™ ๊ตฌ์ถ• (2.3ํ•ญ์—์„œ ์ง„ํ–‰)

2.3 CloudFormation (Infrastructure as Code)

โคต Download GlobalAccelerator_Lab_CF.yaml

GlobalAccelerator_Lab_CF.yaml Template Code View
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instances. Linked to AWS Parameter
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: must be the name of an existing EC2 KeyPair.

Mappings:
AWSRegionArch2AMI:
ap-southeast-2:
HVM64: ami-dc361ebf
sa-east-1:
HVM64: ami-6dd04501

Conditions:
CreateSydneyResources: !Equals [ !Ref 'AWS::Region', ap-southeast-2 ]

Resources:
VPC01:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
InternetGateway0101:
Type: AWS::EC2::InternetGateway
Properties: {}
InternetGatewayAttachment0101:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
InternetGatewayId: !Ref InternetGateway0101
VpcId: !Ref VPC01
PublicRouteTable0101:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC01
DefaultPublicRoute0101:
Type: AWS::EC2::Route
DependsOn: InternetGatewayAttachment0101
Properties:
RouteTableId: !Ref PublicRouteTable0101
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref InternetGateway0101
Subnet0101:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC01
AvailabilityZone: !Select [ 0, !GetAZs '' ]
CidrBlock: 10.0.0.0/24
Subnet0102:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC01
AvailabilityZone: !Select [ 2, !GetAZs '' ]
CidrBlock: 10.0.1.0/24
Subnet0101RouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref PublicRouteTable0101
SubnetId: !Ref Subnet0101
Subnet0102RouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref PublicRouteTable0101
SubnetId: !Ref Subnet0102

WebSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Enable HTTP access via port 80 and SSH access via port 22
VpcId: !Ref VPC01
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: '80'
ToPort: '80'
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: '22'
ToPort: '22'
CidrIp: 0.0.0.0/0

EC2Instance1:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: !FindInMap [AWSRegionArch2AMI, !Ref 'AWS::Region', HVM64]
KeyName: !Ref KeyName
NetworkInterfaces:
- DeviceIndex: 0
SubnetId: !Ref Subnet0101
GroupSet:
- !Ref WebSecurityGroup
AssociatePublicIpAddress: true
UserData:
Fn::Base64:
!Sub |
#!/bin/bash
yum install httpd -y
service httpd start
chkconfig httpd on
echo "<h1>CloudNeta Web Server_1 [Region= ${AWS::Region}] </h1>" > /var/www/html/index.html
EC2Instance2:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: !FindInMap [AWSRegionArch2AMI, !Ref 'AWS::Region', HVM64]
KeyName: !Ref KeyName
NetworkInterfaces:
- DeviceIndex: 0
SubnetId: !Ref Subnet0102
GroupSet:
- !Ref WebSecurityGroup
AssociatePublicIpAddress: true
UserData:
Fn::Base64:
!Sub |
#!/bin/bash
yum install httpd -y
service httpd start
chkconfig httpd on
echo "<h1>CloudNeta Web Server_2 [Region= ${AWS::Region}] </h1>" > /var/www/html/index.html

ALBTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Condition: CreateSydneyResources
Properties:
Name: CloudNetaTG
Port: 80
Protocol: HTTP
VpcId: !Ref VPC01
Targets:
- Id: !Ref EC2Instance1
Port: 80
- Id: !Ref EC2Instance2
Port: 80
ApplicationLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Condition: CreateSydneyResources
Properties:
Scheme: internet-facing
SecurityGroups:
- !Ref WebSecurityGroup
Subnets:
- !Ref Subnet0101
- !Ref Subnet0102
ALBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Condition: CreateSydneyResources
Properties:
DefaultActions:
- Type: forward
TargetGroupArn: !Ref ALBTargetGroup
LoadBalancerArn: !Ref ApplicationLoadBalancer
Port: 80
Protocol: HTTP

  • ํ…œํ”Œ๋ฆฟ ํŒŒ์ผ์„ ๋‹ค์šด๋ฐ›์€ ํ›„ ์‹œ๋“œ๋‹ˆ, ์ƒํŒŒ์šธ๋ฃจ Region์—์„œ CloudFormation ์Šคํƒ์„ ์ƒ์„ฑํ•œ๋‹ค.
  • CloudFormation ์Šคํƒ ์ƒ์„ฑ ์‹œ KeyName ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’์„ ์ž…๋ ฅํ•œ๋‹ค. (EC2-Key Pair ์ƒ์„ฑ์„ ํ•˜์ง€ ์•Š์•˜๋‹ค๋ฉด ์ƒ์„ฑ)
  • CloudFormation์— ์˜ํ•ด ์ƒ์„ฑ๋˜๋Š” ๋ฆฌ์†Œ์Šค๋Š” ์•„๋ž˜์™€ ๊ฐ™์œผ๋ฉฐ, ๊ฐ Region ๋ณ„ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•œ๋‹ค.
์‹œ๋“œ๋‹ˆ CF ์ƒ์„ฑ ์ธํ”„๋ผ
- Web ์„œ๋ฒ„์šฉ EC2-Instance 2๊ฐœ

- VPC 1๊ฐœ, Subnet 2๊ฐœ, Public Route Table 1๊ฐœ, IGW 1๊ฐœ

- Security Group 1๊ฐœ

- Application Load Balancer, Listener, Target Group 1๊ฐœ์”ฉ
์ƒํŒŒ์šธ๋ฃจ CF ์ƒ์„ฑ ์ธํ”„๋ผ
- Web ์„œ๋ฒ„์šฉ EC2-Instance 2๊ฐœ

- VPC 1๊ฐœ, Subnet 2๊ฐœ, Public Route Table 1๊ฐœ, IGW 1๊ฐœ

- Security Group 1๊ฐœ

2.4 ๊ฒ€์ฆ

  • ์‚ฌ์šฉ์ž PC์—์„œ ์‹œ๋“œ๋‹ˆ ALB DNS ์ฃผ์†Œ๋กœ Web ์ ‘๊ทผํ•œ๋‹ค. (์ƒˆ๋กœ๊ณ ์นจ์„ ํ•˜์—ฌ ์ •์ƒ์ ์ธ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ ํ™•์ธ)
  • ์‚ฌ์šฉ์ž PC์—์„œ ์ƒํŒŒ์šธ๋ฃจ EC2-Instance IP ์ฃผ์†Œ๋กœ Web ์ ‘๊ทผํ•œ๋‹ค. (2๋Œ€ ๋ชจ๋‘ ํ™•์ธ)
  • ์ฐธ๊ณ ๋กœ CF์— ์˜ํ•ด ๋ฆฌ์†Œ์Šค๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์˜ฌ๋ผ์˜ค๊ธฐ ๊นŒ์ง€ ์•ฝ๊ฐ„์˜ ์‹œ๊ฐ„์ด ํ•„์š”ํ•˜๋‹ˆ ์ผ์ • ์‹œ๊ฐ„ ๋Œ€๊ธฐ๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

๐Ÿ’ก ๋ณธ๊ฒฉ์ ์ธ ์‹ค์Šต์— ์•ž์„œ, Global Accelerator ๋ฆฌ์†Œ์Šค๋Š” ์†Œ๋Ÿ‰์˜ ๊ณผ๊ธˆ์ด ๋ถˆ๊ฐ€ํ”ผ ํ•˜๋‹ค. (์ตœ์ดˆ ๋ฆฌ์†Œ์Šค ์ƒ์„ฑ ์‹œ ์‹œ๊ฐ„๋‹น ์•ฝ 0.025$)
์ž์„ธํ•œ ์‚ฌํ•ญ์€ Global Accelerator ์š”๊ธˆ ๋งํฌ๋ฅผ ์ฐธ๊ณ  ๋ฐ”๋ž€๋‹ค.



3. Create AWS Global Accelerator


3.1 AWS Global Accelerator ์ƒ์„ฑ

[STEP 1] Enter Name

1) Global Accelerator ๋ฆฌ์†Œ์Šค ์ ‘๊ทผ

  • Global Accelerator๋Š” ์˜ค๋ ˆ๊ณค Region(us-west-2)์—์„œ ๊ด€๋ฆฌ

2) Create Accelerator

3) Enter Name

  • Accelerator Name: CloudNeta-GA

[STEP 2] Add Listeners

  • Port Info: 80
  • Protocol Info: TCP
  • Client affinity Info: None

[STEP 3] Add EndPoint Groups

  • Region Info: ap-southeast-2, Traffic Dial Info: 100

    • Configure Health Checks

      • Health Check Protocol: HTTP, ๋‚˜๋จธ์ง€ Default
  • Add EndPoint Group

  • Region Info: sa-east-1, Traffic Dial Info: 100

    • Configure Health Checks

      • Health Check Protocol: HTTP, ๋‚˜๋จธ์ง€ Default

[STEP 4] Add EndPoints

  • Endpoint group: ap-southeast-2

    • Add endpoint

    • Endpoint type Info: Application Load Balancer

    • Endpoint Info: ALB ๋Œ€์ƒ ์ง€์ •

    • Weight Info: 128

View Screenshot

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%202.png
๊ทธ๋ฆผ 3-1 ์‹œ๋“œ๋‹ˆ EndPoint Group์˜ EndPoint ์„ค์ • ํ™”๋ฉด (ALB)

  • Endpoint group: sa-east-1

    • Add endpoint

    • Endpoint type Info: EC2 instance

    • Endpoint Info: EC2-Instance-1 ๋Œ€์ƒ ์ง€์ •

    • Weight Info: 128

    • Add endpoint

    • Endpoint type Info: EC2 instance

    • Endpoint Info: EC2-Instance-2 ๋Œ€์ƒ ์ง€์ •

    • Weight Info: 128

View Screenshot

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%203.png
๊ทธ๋ฆผ 3-2 ์ƒํŒŒ์šธ๋ฃจ EndPoint Group์˜ EndPoint ์„ค์ • ํ™”๋ฉด (EC2-Instance)

  • Create Accelerator

3.2 AWS Global Accelerator ์ •๋ณด ํ™•์ธ

[STEP 1] Accelerator & Listener ์ •๋ณด

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%204.png
๊ทธ๋ฆผ 3-3 Accelerator ์ •๋ณด์™€ ์ด์— ์†ํ•œ Listener ์ •๋ณด

  • Accelerator Provisioning Status๋Š” Deployed ์ƒํƒœ๋กœ ์ „ํ™˜๋˜์—ˆ๋‹ค.
  • Accelerator์— Staticํ•œ Anycast IP 2๊ฐœ๋ฅผ ํ• ๋‹น ๋ฐ›๋Š”๋‹ค.
  • TCP 80์— ๋Œ€ํ•œ Listener๊ฐ€ ์ƒ์„ฑ๋˜์—ˆ๊ณ  All Healthy ํ•œ ์ƒํƒœ์ด๋‹ค.

[STEP 2] EndPoint Group ํ™•์ธ

  • Listener ๋ฅผ ์„ ํƒ ํ›„ View Details์— ์ ‘๊ทผ ํ•œ๋‹ค.

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%205.png
๊ทธ๋ฆผ 3-4 ์ƒ์„ฑ๋œ Listener ์ •๋ณด์™€ ์ด์— ์†ํ•œ Endpoint Group ์ •๋ณด

  • TCP 80์— ๋Œ€ํ•œ Listener ์ •๋ณด์ด๋‹ค. (Client Affinity๋Š” ๋น„ํ™œ์„ฑํ™” ์ƒํƒœ)
  • ํ•ด๋‹น Listener์— ์†ํ•œ EndPoint Group์„ ํ™•์ธํ•œ๋‹ค. (ap-soutcheast-2์˜ EndPoint Group, sa-east-1์˜ EndPoint Group)
  • ํ˜„์žฌ ๊ฐ EndPoint Group์— ๋Œ€ํ•œ Traffic Dial์€ ๋ชจ๋‘ 100%์ด๋‹ค. (ํŠธ๋ž˜ํ”ฝ ์ˆ˜์šฉ๋ ฅ 100%)

[STEP 3] EndPoint ํ™•์ธ

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%206.png
๊ทธ๋ฆผ 3-5 ์‹œ๋“œ๋‹ˆ Endpoint Group ์ •๋ณด์™€ ์ด์— ์†ํ•œ Endpoint ์ •๋ณด

  • ap-southeast-2์˜ EndPoint Group์— ๋Œ€ํ•œ EndPoint ์ •๋ณด๋ฅผ ํ™•์ธํ•œ๋‹ค. (EndPoint Type: ALB)

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%207.png
๊ทธ๋ฆผ 3-6 ์ƒํŒŒ์šธ๋ฃจ Endpoint Group ์ •๋ณด์™€ ์ด์— ์†ํ•œ Endpoint ์ •๋ณด

  • sa-east-1์˜ EndPoint Group์— ๋Œ€ํ•œ EndPoint 2๋Œ€์˜ ์ •๋ณด๋ฅผ ํ™•์ธํ•œ๋‹ค. (EndPoint Type: EC2)


4. Verify AWS Global Accelerator


4.1 Web ์ ‘์† ๋ถ€ํ•˜ Test

Web ์ ‘์† ํ…Œ์ŠคํŠธ๋Š” ์„œ์šธ, ๋ฒ„์ง€๋‹ˆ์•„ Region์— ์ƒ์„ฑํ•œ EC2-Instance๋ฅผ ํ™œ์šฉํ•œ๋‹ค.

  • Web ์ ‘์† ํ…Œ์ŠคํŠธ๋Š” ๋ฆฌ๋ˆ…์Šค์˜ curl ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๋ฐ˜๋ณต ์ž‘์—…๊ณผ ์ง€์—ฐ ์‹œ๊ฐ„ ์ฒดํฌ๋ฅผ ํ•œ๋‹ค.

Traffic management with AWS Global Accelerator | Amazon Web Services

์ฐธ๊ณ ๋งํฌ: Global Accelerator Traffic Management

4.1.1) ์„œ์šธ EC2-Instance์—์„œ ํ…Œ์ŠคํŠธ

4.1.1-1) Web ์ ‘๊ทผ 100ํšŒ ๋ฐ˜๋ณต ํ…Œ์ŠคํŠธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
    50 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
    50 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    [root@ip-172-31-36-23 ec2-user]#
    • 100ํšŒ ์‹œํ—˜ ๊ฒฐ๊ณผ 100% ๋ชจ๋‘ ์‹œ๋“œ๋‹ˆ (ap-southeast-2)์— ์œ„์น˜ํ•œ Web ์„œ๋ฒ„๋กœ ์ ‘๊ทผ

4.1.1-2) Web ์ง€์—ฐ ์‹œ๊ฐ„ 10ํšŒ ๋ฐ˜๋ณต ํ…Œ์ŠคํŠธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    for ((i=0;i<10;i++)); do curl -w "%{time_total}\n" 75.2.44.82 ; done ;
    <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
    0.298549
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.300328
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.299850
    <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
    0.298484
    <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
    0.299389
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.299195
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.299922
    <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
    0.300531
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.299018
    <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
    0.300288
    [root@ip-172-31-36-23 ec2-user]#
    • Web ์„œ๋ฒ„ ์ ‘๊ทผ ์ง€์—ฐ ์‹œ๊ฐ„์„ 10ํšŒ ๋ฐ˜๋ณต ์‹œ ํ‰๊ท  0.3์ดˆ ๊ฐ€๋Ÿ‰ ์†Œ์š” (10ํšŒ ๋ชจ๋‘ ์‹œ๋“œ๋‹ˆ๋กœ ํ–ฅํ•จ)

4.1.1-3) Traceroute ๊ฒฝ๋กœ ํ™•์ธ (Target ์‹œ๋“œ๋‹ˆ Region EC2-Instance)

  • View Configuration

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    traceroute -I 13.239.18.205
    traceroute to 13.239.18.205 (13.239.18.205), 30 hops max, 60 byte packets
    1 * * *
    2 * * *
    3 * * *
    4 * * *
    5 * * *
    6 100.65.11.1 (100.65.11.1) 2.153 ms 9.538 ms 4.807 ms
    7 54.239.122.39 (54.239.122.39) 1.893 ms 1.922 ms 1.848 ms
    8 54.239.122.244 (54.239.122.244) 2.705 ms 2.776 ms 2.790 ms
    9 54.239.122.235 (54.239.122.235) 1.989 ms 1.947 ms 1.949 ms
    10 52.93.134.2 (52.93.134.2) 152.098 ms 148.786 ms 148.490 ms
    11 54.239.43.246 (54.239.43.246) 148.300 ms 148.447 ms 148.310 ms
    12 52.95.37.70 (52.95.37.70) 150.962 ms 149.034 ms 149.132 ms
    13 150.222.112.215 (150.222.112.215) 149.895 ms 148.703 ms 148.656 ms
    14 150.222.112.216 (150.222.112.216) 149.277 ms 149.290 ms 149.482 ms
    15 52.95.37.91 (52.95.37.91) 149.298 ms 148.914 ms 149.624 ms
    16 150.222.112.18 (150.222.112.18) 153.129 ms 149.476 ms 148.866 ms
    17 * * *
    18 * * *
    19 * * *
    20 * * *
    21 * * *
    22 * * *
    23 * * *
    24 * * *
    25 * * *
    26 * * *
    27 * * *
    28 * * *
    29 * * *
    30 * * *
    [root@ip-172-31-36-23 ec2-user]#

4.1.1-4) Traceroute ๊ฒฝ๋กœ ํ™•์ธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    traceroute -I 75.2.44.82
    traceroute to 75.2.44.82 (75.2.44.82), 30 hops max, 60 byte packets
    1 * * *
    2 * * *
    3 * * *
    4 * * *
    5 * * *
    6 100.65.8.161 (100.65.8.161) 1.184 ms 0.275 ms 0.261 ms
    7 54.239.122.43 (54.239.122.43) 0.604 ms 0.651 ms 0.630 ms
    8 54.239.122.68 (54.239.122.68) 1.121 ms 1.590 ms 1.117 ms
    9 a848faec6df617b94.awsglobalaccelerator.com (75.2.44.82) 0.268 ms 0.256 ms 0.265 ms
    [root@ip-172-31-36-23 ec2-user]#
  • ๋ชฉ์ ์ง€ Target์— ๋”ฐ๋ฅธ Traceroute ๋น„๊ต (1-3ํ•ญ vs 1-4ํ•ญ)

a) Global Accelerator ๋ฏธ์‚ฌ์šฉ

b) Global Accelerator ์‚ฌ์šฉ

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%208.png

๊ทธ๋ฆผ ์ถœ์ฒ˜: AWS Global Accelerator ๊ฐœ์š”

  • ์„œ๋น„์Šค๋ฅผ ์œ„ํ•ด ์ˆ˜๋งŽ์€ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ฑฐ์ณ๊ฐ€๋ฉฐ, ๊ฐ Hop์€ ์„ฑ๋Šฅ์— ์˜ํ–ฅ์„ ์ฃผ๋ฉฐ ์œ„ํ—˜์„ ์ดˆ๋ž˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%209.png

๊ทธ๋ฆผ ์ถœ์ฒ˜: AWS Global Accelerator ๊ฐœ์š”

  • AWS Global Accelerator๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ™œ์šฉํ•˜๋ฏ€๋กœ ์„ฑ๋Šฅ์ด ๊ฐœ์„  ๋ฐ ํšจ์œจ์ ์ธ ํ†ต์‹ ์„ ๋ณด์žฅํ•œ๋‹ค.

4.1.2) ๋ฒ„์ง€๋‹ˆ์•„ EC2-Instance์—์„œ ํ…Œ์ŠคํŠธ

4.1.2-1) Web ์ ‘๊ทผ 100ํšŒ ๋ฐ˜๋ณต ํ…Œ์ŠคํŠธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
    51 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    49 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    [root@ip-172-31-82-0 ec2-user]#
    • 100ํšŒ ์‹œํ—˜ ๊ฒฐ๊ณผ 100% ๋ชจ๋‘ ์ƒํŒŒ์šธ๋ฃจ (sa-east-1)์— ์œ„์น˜ํ•œ Web ์„œ๋ฒ„๋กœ ์ ‘๊ทผ

4.1.2-2) Web ์ง€์—ฐ ์‹œ๊ฐ„ 10ํšŒ ๋ฐ˜๋ณต ํ…Œ์ŠคํŠธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    for ((i=0;i<10;i++)); do curl -w "%{time_total}\n" 75.2.44.82 ; done ;
    <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    0.227008
    <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    0.227156
    <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    0.225631
    <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    0.227213
    <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    0.224898
    <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    0.225725
    <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    0.225744
    <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
    0.226330
    <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    0.227288
    <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
    0.226509
    [root@ip-172-31-82-0 ec2-user]#
    • Web ์„œ๋ฒ„ ์ ‘๊ทผ ์ง€์—ฐ ์‹œ๊ฐ„์„ 10ํšŒ ๋ฐ˜๋ณต ์‹œ ํ‰๊ท  0.22์ดˆ ๊ฐ€๋Ÿ‰ ์†Œ์š” (10ํšŒ ๋ชจ๋‘ ์ƒํŒŒ์šธ๋ฃจ๋กœ ํ–ฅํ•จ)

4.1.2-3) Traceroute ๊ฒฝ๋กœ ํ™•์ธ (Target GA Anycast IP)

  • View Configuration

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    traceroute -I 75.2.44.82
    traceroute to 75.2.44.82 (75.2.44.82), 30 hops max, 60 byte packets
    1 216.182.238.211 (216.182.238.211) 1.183 ms 1.183 ms 1.181 ms
    2 * * *
    3 * * *
    4 * * *
    5 * * *
    6 * * *
    7 100.65.12.65 (100.65.12.65) 0.323 ms 0.324 ms 0.299 ms
    8 52.93.28.239 (52.93.28.239) 0.530 ms 0.485 ms 0.431 ms
    9 100.100.10.28 (100.100.10.28) 0.595 ms 1.151 ms 1.033 ms
    10 100.95.2.131 (100.95.2.131) 20.297 ms 83.331 ms 69.912 ms
    11 a848faec6df617b94.awsglobalaccelerator.com (75.2.44.82) 0.432 ms 0.488 ms 0.446 ms
    [root@ip-172-31-82-0 ec2-user]#

4.1.3) Web ์ ‘์† ํ๋ฆ„

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2010.png

๊ทธ๋ฆผ 4-1 ๋ฆฌ์ „ ๋ณ„ User์—์„œ Web ์„œ๋ฒ„๋กœ ์ ‘๊ทผ ์‹œ ๋…ผ๋ฆฌ์ ์ธ ํ๋ฆ„

  • User์—์„œ ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด Edge Location์œผ๋กœ ํŠธ๋ž˜ํ”ฝ์ด ์ „์†กํ•œ๋‹ค. (Target: Anycast IP ์‚ฌ์šฉ)
  • AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์ตœ์ ์˜ EndPoint Group์œผ๋กœ ์ „์†กํ•˜์—ฌ ์„œ๋น„์Šคํ•œ๋‹ค.
  • ์˜ˆ๋ฅผ ๋“ค์–ด ํ•œ๊ตญ์—์„œ ์ ‘๊ทผํ•˜๋Š” ์‚ฌ์šฉ์ž๋Š” ์ธ์ ‘ํ•œ Edge Location์œผ๋กœ Web ์ ‘๊ทผ ์š”์ฒญ์„ ๋ณด๋‚ด๊ณ , Edge Location์—์„œ ๊ฐ€์žฅ ๊ฐ€๊น๊ณ  Healthyํ•œ EndPoint Group์ธ ์‹œ๋“œ๋‹ˆ (ap-southeast-2)๋กœ AWS ๊ธ€๋กœ๋ฒŒ ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด ์„œ๋น„์Šคํ•œ๋‹ค.

4.2 Traffic Dial & Weight ์กฐ์ • Test

  • Traffic Dial์€ EndPoint Group์— ๋Œ€ํ•œ ํŠธ๋ž˜ํ”ฝ ์ˆ˜์šฉ๋ ฅ์ด๋ฉฐ, Weight๋Š” EndPoint ๋ณ„ ํŠธ๋ž˜ํ”ฝ ์ „์†ก ๊ฐ€์ค‘์น˜์ด๋‹ค.

4.2.1) Traffic Dial ์กฐ์ •

  • ํ˜„์žฌ EndPoint Group์˜ Traffic Dial์€ 100%๋กœ ์„ค์ •๋˜์–ด ๋ชจ๋“  ํŠธ๋ž˜ํ”ฝ์„ ์ˆ˜์šฉํ•˜๊ณ  ์žˆ๋‹ค.

    ์ฆ‰, ์„œ์šธ โ€”> ์‹œ๋“œ๋‹ˆ 100%, ๋ฒ„์ง€๋‹ˆ์•„ โ€”> ์ƒํŒŒ์šธ๋ฃจ 100%

4.2.1-1) Traffic Dial: ์‹œ๋“œ๋‹ˆ 50%, ์ƒํŒŒ์šธ๋ฃจ 100% (์„œ์šธ ์—์„œ ํ…Œ์ŠคํŠธ)

  • Accelerator ์„ ํƒ โ€”> Listener ์„ ํƒ ํ›„ view detail โ€”> endpoint group์„ ์„ ํƒ ํ›„ edit

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2011.png

๊ทธ๋ฆผ 4-2 ์‹œ๋“œ๋‹ˆ EndPoint Group์˜ Traffic Dial์„ 50%๋กœ ์กฐ์ •

1
2
3
4
5
6
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
27 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
27 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
23 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
23 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-36-23 ec2-user]#
  • ํ•œ๊ตญ ์‚ฌ์šฉ์ž ๊ธฐ์ค€์œผ๋กœ ์•ฝ 50%์ •๋„๋Š” ์‹œ๋“œ๋‹ˆ(ap-southeast-2)์—์„œ ์ฒ˜๋ฆฌ๋˜๊ณ  ๋‚˜๋จธ์ง€๋Š” ์ƒํŒŒ์šธ๋ฃจ(sa-east-1)์—์„œ ์ฒ˜๋ฆฌ๋œ๋‹ค.

4.2.1-2) Traffic Dial: ์‹œ๋“œ๋‹ˆ 0%, ์ƒํŒŒ์šธ๋ฃจ 100% (์„œ์šธ ์—์„œ ํ…Œ์ŠคํŠธ)

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2012.png

๊ทธ๋ฆผ 4-3 ์‹œ๋“œ๋‹ˆ EndPoint Group์˜ Traffic Dial์„ 0%๋กœ ์กฐ์ •

1
2
3
4
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
50 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
50 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-36-23 ec2-user]#
  • ํ•œ๊ตญ ์‚ฌ์šฉ์ž ๊ธฐ์ค€์œผ๋กœ 100% ๋ชจ๋‘ ์ƒํŒŒ์šธ๋ฃจ(sa-east-1)์—์„œ ์ฒ˜๋ฆฌ๋œ๋‹ค. (๋น„๋ก ์‚ฌ์šฉ์ž ์ž…์žฅ์—์„œ ์‹œ๋“œ๋‹ˆ๊ฐ€ ์ธ์ ‘ํ•ด ์žˆ์ง€๋งŒ Traffic Dial์ด 0% ์ด๊ธฐ ๋•Œ๋ฌธ์—)
  • ํ…Œ์ŠคํŠธ ์™„๋ฃŒ ํ›„ Traffic Dial ๊ฐ’ ์›์ƒ ๋ณต๊ตฌ (100%)

๐Ÿ’ก Traffic Dial 0%๋Š” ์–ธ์ œ ์‚ฌ์šฉํ• ๊นŒ?
Traffic Dial 0% ์„ค์ •์€ Region ๋‚ด์—์„œ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ฑฐ๋‚˜ ์œ ์ง€ ๊ด€๋ฆฌ๊ฐ€ ํ•„์š”ํ• ๋•Œ, ๋จผ์ € Traffic Dial์„ 0%์œผ๋กœ ์„ค์ •ํ•˜์—ฌ ํŠธ๋ž˜ํ”ฝ์„ ์ฐจ๋‹จํ•œ๋‹ค. ์ž‘์—…์„ ์™„๋ฃŒํ•˜๊ณ  ๋‹ค์‹œ ์‚ฌ์šฉํ•  ์ค€๋น„๊ฐ€ ๋˜๋ฉด, Traffic Dial์„ 100์œผ๋กœ ์กฐ์ •ํ•˜์—ฌ ํŠธ๋ž˜ํ”ฝ์„ ๋‹ค์‹œ ์ˆ˜์šฉํ•œ๋‹ค.


4.2.2) Weight ์กฐ์ •

  • ํ˜„์žฌ ์ƒํŒŒ์šธ๋ฃจ EndPoint Group์˜ 2๊ฐœ์˜ EndPoint์˜ Weight ๊ฐ’์€ ๊ฐ๊ฐ 128๋กœ ๋™์ผํ•œ ๋น„์ค‘์„ ์„ค์ •ํ•˜๊ณ  ์žˆ๋‹ค.

  • Weight์— ๋Œ€ํ•œ ํŠธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ ๊ณต์‹์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค. (์ž์‹ ์˜ Weight / ์ „์ฒด Weight ํ•ฉ)

    ์ฆ‰, EndPoint#1 ๊ณ„์‚ฐ๊ฐ’: 128 / (128+128) = 1/2, EndPoint#2 ๊ณ„์‚ฐ๊ฐ’: 128 / (128+128) = 1/2

4.2.2-1) ์ƒํŒŒ์šธ๋ฃจ EndPoint#1 Weight: 64, ์ƒํŒŒ์šธ๋ฃจ EndPoint#2 Weight: 128 (๋ฒ„์ง€๋‹ˆ์•„ ์—์„œ ํ…Œ์ŠคํŠธ)

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2013.png

๊ทธ๋ฆผ 4-4 ์ƒํŒŒ์šธ๋ฃจ EndPoint Group์˜ EndPoint#1์˜ Weight ๊ฐ’์„ 64๋กœ ์กฐ์ •

1
2
3
4
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
67 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
33 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-95-200 ec2-user]#
  • ๊ณ„์‚ฐ์„ ํ•ด๋ณด๋ฉด EP#1 = 64 / (64+128) = 1/3 ์ด๊ณ , EP#2 = 128 / (64+128) = 2/3 ์ด๋‹ค.

4.2.2-2) ์ƒํŒŒ์šธ๋ฃจ EndPoint#1 Weight: 0, ์ƒํŒŒ์šธ๋ฃจ EndPoint#2 Weight: 128 (๋ฒ„์ง€๋‹ˆ์•„ ์—์„œ ํ…Œ์ŠคํŠธ)

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2014.png

๊ทธ๋ฆผ 4-5 ์ƒํŒŒ์šธ๋ฃจ EndPoint Group์˜ EndPoint#1์˜ Weight ๊ฐ’์„ 0์œผ๋กœ ์กฐ์ •

1
2
3
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
100 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
[root@ip-172-31-95-200 ec2-user]#
  • EP#1์˜ Weight๊ฐ€ 0์ด๋ฏ€๋กœ ํŠธ๋ž˜ํ”ฝ์ด ์ „๋‹ฌ๋˜์ง€ ์•Š๊ณ  EP#2๋กœ ๋ชจ๋‘ ์ „๋‹ฌ๋œ๋‹ค.
  • ํ…Œ์ŠคํŠธ ์™„๋ฃŒ ํ›„ Weight ๊ฐ’ ์›์ƒ ๋ณต๊ตฌ (128)

๐Ÿ’ก Traffic Dial ๊ฐ’์„ ์กฐ์ •ํ•˜์—ฌ EndPoint Group์˜ ํŠธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ ๋น„์ค‘์„ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ,
Weight ๊ฐ’์„ ์กฐ์ •ํ•˜์—ฌ EndPoint์˜ ํŠธ๋ž˜ํ”ฝ ์ฒ˜๋ฆฌ ๋น„์ค‘์„ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋‹ค.


4.3 Client Affinity Test

  • AWS Global Accelerator์—์„œ ํŠน์ • Source IP ์ฃผ์†Œ์˜ ์‚ฌ์šฉ์ž ์š”์ฒญ์„ ๋™์ผํ•œ EndPoint ์ž์›์œผ๋กœ ๋ณด๋‚ด ์ ‘์† ์„ ํ˜ธ๋„๋ฅผ ์œ ์ง€ํ•˜๋„๋ก ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค.

Listeners in AWS Global Accelerator

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2015.png

๊ทธ๋ฆผ 4-6 Listener์—์„œ Client Affinity ์„ค์ •์„ Source IP๋กœ ๋ณ€๊ฒฝ

  • GA์—์„œ ์ƒ์„ฑํ•œ Listener๋ฅผ Editํ•˜์—ฌ Client Affinity๋ฅผ None์—์„œ Source IP๋กœ ์ˆ˜์ •ํ•œ๋‹ค.

    ์ฆ‰, Source IP ๊ธฐ์ค€์œผ๋กœ ํŠน์ • EndPoint ๋Œ€์ƒ์œผ๋กœ ์ง€์†์ ์ธ ์—ฐ๊ฒฐ์„ ๋ณด์žฅํ•œ๋‹ค. (๋งˆ์น˜ Sticky Session)

  • Test Target์€ 2๊ฐœ์˜ EndPoint๊ฐ€ ์กด์žฌํ•˜๋Š” ์ƒํŒŒ์šธ๋ฃจ๋กœ ํ–ฅํ•˜๋„๋ก ํ•œ๋‹ค.

4.3.1) ๋ฒ„์ง€๋‹ˆ์•„์—์„œ Web ์ ‘์†

1
2
3
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
100 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-95-200 ec2-user]#
  • ์ƒํŒŒ์šธ๋ฃจ์—์„œ ํ•˜๋‚˜์˜ EndPoint๋กœ๋งŒ ์ ‘์†์ด ์ด๋ฃจ์–ด ์ง„๋‹ค. (EP#1 - Web Server_1)

4.3.2) ์„œ์šธ์—์„œ Web ์ ‘์†

  • ์„œ์šธ์—์„œ ์ ‘์† ์‹œ ์‹œ๋“œ๋‹ˆ Web Server๋กœ๋งŒ ์ ‘์†๋˜๋ฏ€๋กœ, Traffic Dial์„ 0์œผ๋กœ ์กฐ์ •ํ•˜์—ฌ ์ƒํŒŒ์šธ๋ฃจ๋กœ ํ–ฅํ•˜๊ฒŒ ์„ค์ •ํ•œ ํ›„ ํ…Œ์ŠคํŠธ ํ•œ๋‹ค.

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2012.png

๊ทธ๋ฆผ 4-7 ์‹œ๋“œ๋‹ˆ EndPoint Group์˜ Traffic Dial์„ 0%๋กœ ์กฐ์ •

1
2
3
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
100 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
[root@ip-172-31-37-218 ec2-user]#
  • ์ƒํŒŒ์šธ๋ฃจ์—์„œ ํ•˜๋‚˜์˜ EndPoint๋กœ๋งŒ ์ ‘์†์ด ์ด๋ฃจ์–ด ์ง„๋‹ค. (EP#2 - Web Server_2)
  • ํ…Œ์ŠคํŠธ ์™„๋ฃŒ ํ›„ Traffic Dial๊ณผ Client Affinity ๊ฐ’ ๋ณต๊ตฌ

4.4 Preserve Client IP Test

  • AWS Global Accelerator์˜ ์ถ”๊ฐ€๋œ ๊ธฐ๋Šฅ์œผ๋กœ Client IP ์ฃผ์†Œ๋ฅผ ์œ ์ง€ํ•˜์—ฌ ๋ณด์กดํ•˜๋Š” ๊ธฐ๋Šฅ์ด๋‹ค.

  • EndPoint ๋ณ„ Client IP ๋ณด์กด ๊ธฐ๋Šฅ

    • EC2 : ํ•ญ์ƒ ํ™œ์„ฑํ™”

    • ALB : ์„ ํƒ ๊ฐ€๋Šฅ (ํ™œ์„ฑํ™”/๋น„ํ™œ์„ฑํ™”)

    • EIP, NLB : ํ•ญ์ƒ ๋น„ํ™œ์„ฑํ™”

Preserve Client IP Addresses in AWS Global Accelerator

์ฐธ๊ณ ๋งํฌ : ํด๋ผ์ด์–ธํŠธ IP ๋ณด์กด ๊ด€๋ จ ๋ฌธ์„œ

4.4.1) EC2 EndPoint ๋Œ€์ƒ Client IP ๋ณด์กด (์ƒํŒŒ์šธ๋ฃจ)

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2016.png
๊ทธ๋ฆผ 4-8 EC2 EndPoint Type์—์„œ Client IP ๋ณด์กด ์ƒํƒœ (ํ™œ์„ฑํ™”)

  • EndPoint ํƒ€์ž…์ด EC2 ์ผ ๊ฒฝ์šฐ Client IP ๋ณด์กด ๊ธฐ๋Šฅ์€ ํ•ญ์ƒ ํ™œ์„ฑํ™” ์ƒํƒœ์ด๋‹ค.
1
2
3
4
5
6
7
8
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
54 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
46 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
[root@ip-172-31-95-200 ec2-user]#

curl ifconfig.me
54.163.161.100
[root@ip-172-31-95-200 ec2-user]#
  • ๋ฒ„์ง€๋‹ˆ์•„์—์„œ GA Anycast IP ํƒ€๊ฒŸ์œผ๋กœ Web ์ ‘๊ทผ ์‹œ๋„ ๋ฐ ์ž์‹ ์˜ ๊ณต์ธ IP ํ™•์ธ
1
2
3
4
5
6
7
tail -f /var/log/httpd/access_log
:
54.163.161.100 - - [05/May/2020:03:31:23 +0000] "GET / HTTP/1.1" 200 53 "-" "curl/7.61.1"
54.163.161.100 - - [05/May/2020:03:31:24 +0000] "GET / HTTP/1.1" 200 53 "-" "curl/7.61.1"
54.163.161.100 - - [05/May/2020:03:31:24 +0000] "GET / HTTP/1.1" 200 53 "-" "curl/7.61.1"
:
[root@ip-10-0-1-252 ec2-user]#
  • ์ƒํŒŒ์šธ๋ฃจ Web ์„œ๋ฒ„์—์„œ HTTP ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ณด๋ฉด Client IP (๋ฒ„์ง€๋‹ˆ์•„)๊ฐ€ ๋ณด์กด๋˜์–ด ๊ทธ๋Œ€๋กœ ์ธ์ž…๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

4.4.2) ALB EndPoint ๋Œ€์ƒ Client IP ๋ณด์กด (์‹œ๋“œ๋‹ˆ)

  • EndPoint ํƒ€์ž…์ด ALB ์ผ ๊ฒฝ์šฐ Client IP ๋ณด์กด ๊ธฐ๋Šฅ์€ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค. (ํ™œ์„ฑํ™”/๋น„ํ™œ์„ฑํ™”)
  • ALB Backend์— ์กด์žฌํ•˜๋Š” EC2์—์„œ Client IP ์ฃผ์†Œ๋ฅผ ํ™•์ธํ•˜๋ ค๋ฉด X-Forwarded-For ํ—ค๋”๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์บก์ณํ•ด์•ผ ํ•œ๋‹ค.

ELB ์•ก์„ธ์Šค ๋กœ๊ทธ์—์„œ ํด๋ผ์ด์–ธํŠธ IP ์ฃผ์†Œ ์บก์ฒ˜

์ฐธ๊ณ ๋งํฌ : ELB ์—‘์„ธ์Šค ๋กœ๊ทธ์—์„œ ํด๋ผ์ด์–ธํŠธ IP ์ฃผ์†Œ ํ™•์ธ

4.4.2.1) Client IP ๋ณด์กด ํ™œ์„ฑํ™”

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2017.png
๊ทธ๋ฆผ 4-9 ALB EndPoint Type์—์„œ Client IP ๋ณด์กด ์ƒํƒœ (ํ™œ์„ฑํ™”)

1
2
3
4
5
6
7
8
vi /etc/httpd/conf/httpd.conf
:
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
:
[root@ip-10-0-0-211 ec2-user]# service httpd reload
Reloading httpd:
[root@ip-10-0-0-211 ec2-user]#
  • ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„์—์„œ /etc/httpd/conf/httpd.conf ํŒŒ์ผ์˜ LogFormat ์„น์…˜์—์„œ ์œ„ ๋‚ด์šฉ์„ ์ถ”๊ฐ€ ํ•œ๋‹ค. (http ๋ฐ๋ชฌ reload)
1
2
3
4
5
6
7
8
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
50 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
50 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
[ec2-user@ip-172-31-37-218 ~]$

curl ifconfig.me
15.164.93.22
[ec2-user@ip-172-31-37-218 ~]$
  • ์„œ์šธ ์—์„œ GA Anycast IP ํƒ€๊ฒŸ์œผ๋กœ Web ์ ‘๊ทผ ์‹œ๋„ ๋ฐ ์ž์‹ ์˜ ๊ณต์ธ IP ํ™•์ธ
1
2
3
4
5
6
7
tail -f /var/log/httpd/access_log
:
15.164.93.22 10.0.1.18 - - [05/May/2020:04:13:05 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
15.164.93.22 10.0.0.76 - - [05/May/2020:04:13:05 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
15.164.93.22 10.0.0.76 - - [05/May/2020:04:13:06 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
:
[root@ip-10-0-0-211 ec2-user]#
  • ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„์—์„œ HTTP ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ณด๋ฉด Client IP (์„œ์šธ)๊ฐ€ ๋ณด์กด๋˜์–ด ๊ทธ๋Œ€๋กœ ์ธ์ž…๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

4.4.2.2) Client IP ๋ณด์กด ๋น„ํ™œ์„ฑํ™”

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2018.png
๊ทธ๋ฆผ 4-10 ALB EndPoint Type์—์„œ Client IP ๋ณด์กด ์„ค์ • ๋ณ€๊ฒฝ (๋น„ํ™œ์„ฑํ™”)

  • ์‹œ๋“œ๋‹ˆ์˜ ALB EndPoint Type์„ Editํ•˜์—ฌ Preserve Client IP address ์ฒดํฌ๋ฅผ ํ•ด์ œํ•œ๋‹ค. (Client IP ๋ณด์กด ๋น„ํ™œ์„ฑํ™”)
  • Global Accelerator ๊ฐ€ ์žฌ์‹œ๋™ ๋˜์–ด ์•ฝ๊ฐ„์˜ ๋Œ€๊ธฐ๊ฐ€ ํ•„์š”ํ•˜๋‹ค.
1
2
3
4
5
6
7
8
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
50 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
50 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
[ec2-user@ip-172-31-37-218 ~]$

curl ifconfig.me
15.164.93.22
[ec2-user@ip-172-31-37-218 ~]$
  • ์„œ์šธ ์—์„œ GA Anycast IP ํƒ€๊ฒŸ์œผ๋กœ Web ์ ‘๊ทผ ์‹œ๋„ ๋ฐ ์ž์‹ ์˜ ๊ณต์ธ IP ํ™•์ธ
1
2
3
4
5
6
tail -f /var/log/httpd/access_log
:
99.82.168.137 10.0.0.76 - - [05/May/2020:04:24:21 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
99.82.168.139 10.0.1.18 - - [05/May/2020:04:24:22 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
99.82.168.137 10.0.0.76 - - [05/May/2020:04:24:23 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.61.1"
[root@ip-10-0-0-211 ec2-user]#
  • ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„์—์„œ HTTP ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ณด๋ฉด Client IP (์„œ์šธ)๊ฐ€ ๋ณด์กด๋˜์ง€ ์•Š๊ณ , GA์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋‚ด๋ถ€ ์ฃผ์†Œ ๋Œ€์—ญ์ด Source IP๋กœ ๋“ค์–ด ์˜จ๋‹ค.

๐Ÿ’ก Client IP ๋ณด์กด ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋ฉด?
IP ๋ณ„ ํ•„ํ„ฐ๋ง์„ ์ˆ˜์›”ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๊ณ , ํŠน์ • IP๋งˆ๋‹ค ์ œ๊ณต ์ปจํ…์ธ  ๋ถ„๋ฅ˜ํ•˜๊ฑฐ๋‚˜ ํ†ต๊ณ„ ์ •๋ณด ํ™œ์šฉ์— ์œ ์šฉํ•˜๋‹ค.


4.5 Failover Test

  • ์‹œ๋“œ๋‹ˆ(ap-southeast-2)์— ์œ„์น˜ํ•˜๋Š” Web ์„œ๋ฒ„๋ฅผ ํ•œ๋Œ€ ์”ฉ Stop ํ›„ ๋™์ž‘์„ ํ™•์ธํ•œ๋‹ค.
  • Client๋Š” ์„œ์šธ์„ ๊ธฐ์ค€์œผ๋กœ ํ•œ๋‹ค.

4.5.1) ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„ 1๋Œ€ Stop

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2019.png
๊ทธ๋ฆผ 4-11 ์‹œ๋“œ๋‹ˆ Web Server 1๋Œ€ ์ค‘์ง€

1
2
3
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
100 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
[root@ip-172-31-37-218 ec2-user]#
  • ALB์— ์˜ํ•˜์—ฌ Load Balancing ๋˜๋Š” ํ™˜๊ฒฝ์ด๋ผ ๋‹ค๋ฅธ Web ์„œ๋ฒ„๊ฐ€ ๋ชจ๋‘ ์ฒ˜๋ฆฌ ํ•ด ์ค€๋‹ค.

4.5.2) ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„ ๋ชจ๋‘ Stop

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2020.png
๊ทธ๋ฆผ 4-12 ์‹œ๋“œ๋‹ˆ ๋‚˜๋จธ์ง€ Web Server 1๋Œ€ ์ค‘์ง€ (์ „์ฒด ์ค‘์ง€)

1
2
3
4
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
50 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
50 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-37-218 ec2-user]#
  • ์‹œ๋“œ๋‹ˆ(ap-southeast-2)์˜ Web ์„œ๋ฒ„ ๋ชจ๋“  ์ž์›์ด Stop ๋˜์ž ์ƒํŒŒ์šธ๋ฃจ(sa-east-1)๋กœ ๊ฒฝ๋กœ๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ ๋ชจ๋‘ ์ฒ˜๋ฆฌํ•œ๋‹ค.

4.5.3) Global Accelerator ์ƒํƒœ ํ™•์ธ

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2021.png
๊ทธ๋ฆผ 4-13 Lisener ์ƒํƒœ ํ™•์ธ

  • ๋ฆฌ์Šค๋„ˆ์˜ ์ƒํƒœ๋ฅผ ํ™•์ธํ•ด๋ณด๋ฉด 1 Unhealthy endpoints ์ƒํƒœ์ด๋‹ค.

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2022.png
๊ทธ๋ฆผ 4-14 EndPoints Health Check ์ƒํƒœ ํ™•์ธ

  • Unhealthy ์ƒํƒœ์˜ Endpoint๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

4.5.4) ์‹œ๋“œ๋‹ˆ Web ์„œ๋ฒ„ ๋ชจ๋‘ Start

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2023.png
๊ทธ๋ฆผ 4-15 ์‹œ๋“œ๋‹ˆ Web Server ๋ชจ๋‘ ํ™œ์„ฑํ™”

1
2
3
4
5
6
7
8
9
10
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
46 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
44 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
5 <h1>CloudNeta Web Server_2 [Region= sa-east-1] </h1>
5 <h1>CloudNeta Web Server_1 [Region= sa-east-1] </h1>
[root@ip-172-31-37-218 ec2-user]#
for i in {1..100}; do curl -s -q 75.2.44.82 ; done | sort | uniq -c | sort -nr
51 <h1>CloudNeta Web Server_2 [Region= ap-southeast-2] </h1>
49 <h1>CloudNeta Web Server_1 [Region= ap-southeast-2] </h1>
[root@ip-172-31-37-218 ec2-user]#
  • Health Check์— ์˜ํ•˜์—ฌ ์‹œ๋“œ๋‹ˆ ์ชฝ EndPoint Group์ด Healthy ์ƒํƒœ๋กœ ์ „ํ™˜๋˜๊ธฐ ๊นŒ์ง€ ์ƒํŒŒ์šธ๋ฃจ์—์„œ ์ฒ˜๋ฆฌํ•˜๋ฉฐ, ์ด ํ›„ ์‹œ๋“œ๋‹ˆ์—์„œ ๋ชจ๋‘ ์ฒ˜๋ฆฌํ•œ๋‹ค.

LabGuide%20AWS%20Global%20Accelerator%2086f3714d71d24b4c940958dfd90b2d52/Untitled%2024.png
๊ทธ๋ฆผ 4-16 Lisener ์ƒํƒœ ํ™•์ธ

  • All Healthy ์ƒํƒœ๋กœ ์ „ํ™˜


5. Delete Infrastructure

1) AWS Global Accelerator Disable

2) AWS Global Accelerator Delete

  • AWS Global Accelerator์— ๋Œ€ํ•ด Delete ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๊ณ , Disable ํ›„ Delete

3) ์‹œ๋“œ๋‹ˆ CloudFormation Stack Delete

4) ์ƒํŒŒ์šธ๋ฃจ CloudFormation Stack Delete

5) ํ•œ๊ตญ EC2-Instance Shutdown

6) ๋ฒ„์ง€๋‹ˆ์•„ EC2-Instance Shutdown

๐Ÿ”” CloudFormation ์Šคํƒ์„ ์‚ญ์ œ ์‹œ ์ผ์ • ์‹œ๊ฐ„์ด ์†Œ์š”๋˜๋Š”๋ฐ, ๋„ˆ๋ฌด ์‹œ๊ฐ„์ด ์˜ค๋ž˜ ๊ฑธ๋ฆฐ๋‹ค๋ฉด ์ˆ˜๋™์œผ๋กœ ๊ด€๋ จ ์ธํ”„๋ผ๋ฅผ ์‚ญ์ œํ•ด์•ผ ํ•œ๋‹ค.
๋ฐ˜๋“œ์‹œ, ์‹ค์Šต์„ ์œ„ํ•ด ์ƒ์„ฑํ•œ ๋ฆฌ์†Œ์Šค๋Š” ์‚ญ์ œํ•œ๋‹ค.


Welcome to my other publishing channels