스마트시대

CloudFront Distribution Connection 본문

AWS/연습구축

CloudFront Distribution Connection

스마트시대 2021. 7. 27. 14:38
728x90

1. Seoul Region - S3 Bucket - CloudFront Distribution Connection

* Select ticket-s3-web.s3.amazonaws.com, the created S3, 

and have to change S3 to ticket-s3-web.ap-northeast-2.amazonaws.com 

as Regional DNS Name by typing in manual.

 

All settings are created with default values and applied.

 

The purpose for Seoul Region - S3 Bucket - CloudFront Distribution Connection. 

In other words, it is for caching static content by CloudFront and delivering the content to the webserver at high speed. This method is faster than the webserver - S3 connection. 

They are applied according to customer's performance-oriented requirements.

 

2. Virginia Region - S3 Bucket - CloudFront Distribution Connection

All settings are created with default values and applied.

 

The purpose for Virginia Region - S3 Bucket - CloudFront Distribution Connection. 

In other words, it is for caching static content by CloudFront and delivering the content to the webserver at high speed. This method is faster than the webserver - S3 connection. 

They are applied according to customer's performance-oriented requirements.

 

When reading stored content, it goes through CloudFront.

* S3 is the place to store static content, but it is set to request from CloudFront.

Using CloudFront for fast service delivery based on the scenario of simultaneously serving the world.

 

3. Django - S3 (CloudFront) integration

The “AWS information” item is used after being separated in the aws_access_tools.py file.

 

Register the CloudFront URL, which static and dynamic content would load in the Django configuration file.

 

4. ELB - CloudFront Distribution Connection

Internal communication only uses HTTP protocol

 

Redirects to HTTPS even if the client connects through HTTP

 

You use all HTTP methods because you need to send dynamic contents.

 

Configure as follows to disable caching to deliver dynamic content.

 

Only the FQDN entered in Alternate Domain Names can create a record area in Rotue53.

And enter the certificate generated by ACM.

 

5. Add a Route 53 Failover Default Zone

Since CloudFront provides HTTPS service, set the health check protocol to HTTPS (443).

 

In order to know the abnormal state more quickly, the request interval set to fast, and the failure threshold set to 2.

 

Generated health checks

 

Create a www.ticketing.pw record and connect it with CloudFront.

When the health check is normal, it is routed to CloudFront and connected to the web server in the Seoul Region.

 

Create a ticketing.pw record and connect it with CloudFront.

When the health check is normal, it is routed to CloudFront and connected to the web server in the Seoul Region.

 

Created Failover Record Default Zone

 

CloudFront Performance Improvement Test

The website used for testing: https://www.pingdom.com/

When connecting to ticketing.pw from the US, it is set to connect to ELB in Seoul.

 

When connecting to ELB in the Seoul Region from the US, it took 4.45 seconds due to speed measurement.

 

Set to connect to CloudFront when accessing ticketing.pw from the US.

 

As a result of measuring the speed when connecting to CloudFront in the US, it took 1.25 seconds.

 

As a result of testing, CloudFront can connect about 3.5 times faster.

If you use CloudFront, you can quickly access the ELB using AWS's backbone network, even without caching dynamic content, which improves speed.

 

728x90
반응형

'AWS > 연습구축' 카테고리의 다른 글

[SpringBoot]AWS ECS, ECR이미지 Github action으로 배포 환경 구축하기  (0) 2023.03.01
AWS Route 53 Failover test  (0) 2021.07.14
Build AWS Route 53  (0) 2021.07.14
Create MySQL DB(RDS)  (0) 2021.07.13
Build ELB  (0) 2021.07.13
Comments