Getting started with AWS Cloudfront
Cloudfront sms 정적, 동적 웹 콘텐츠를 빠르게 distribute 하기 위한 서비스이다.
이를 위해 aws 는 edge location 이라는 데이터 센터의 네트워크에 사용자의 데이터를 보관한다.
여기서 제일 빠르게 배포될 수 있는 edge location 으로 route 된다.
만약 해당하는 edge location 에 파일이 없다면, cloudfront 는 원본 위치에서 파일을 가져온다.
cloudfront 를 사용하지 않으면 네트워크는 해당 파일이 어디에 있는지 모르기 때문에 여러 네트워크를 경유해서 낮은 latency 를 가지게 된다.
당시의 파일은 여러개의 edge location 에 복사되어 저장된다.
How to setup
-
specify origin server like s3 ec2 etc...
-
upload file to origin server including web pages, fines,
if you use s3bucket make it public
-
create cloudfron distribution
-
Cloudfron assigns a domain name to you new distribution that you can see in cloudformation console
-
edge locations which is collections of servers in geographically dispersed data centers copies of your objects