Cloud Front
Cloud Front
Cloud Front
It is a web service that speeds up your static and dynamic web content like .html, .css
and images files etc. It delivers your content through a worldwide network data centers
called edge locations. Aws has 60 edge locations all over the world.
When an user request the content that are using cloudfront, the user request is routed
to nearest edge location for high performance, low latency and high availability.
If the content is not serving with cloud front, cloud front retrieves it from s3 (or) http
request that you have configured with cloud front.
For ex: your server is in us and an request came from india, if you haven’t configured
cloudfront, the web server will take sometime to serve the content because the request
is routed through different networks to reach there. But, if you have configured cloud
front in the edge locations, it will give the content with low latency and high
performance than normal.
We have to create a cloudfront distribution to tell cloudfront from which server you
have to get files to server an user request. At the same time, you can specify whether
cloudfront to logs all your requests.
After creating a cloud front distribution, it gives you an domain name which shows in
cloudfront console. You have to use this domain name (or) you can also configure your
custom domain name with route 53.
Cloudfront sends your distribution’s configuration (not the content) to all edge locations
by cahing your objects.
By default, each object stays in edge locations for 24 hours (default). The maximum time
is 8760 hours. After the maximum time is finished, the object expires from the edge
locations.
REPORTS
Most are these reports are based on cloud front access logs, which contains information
about every request that cloud front receives.
Cloudfront cache statistics reports = this contains the following information.
Total requests
Percentage of viewer requests by result type.
Bytes transferred to viewers.
http status codes
percentage of get requests that didn’t finished downloading.
To display cache statistics,
Go to cloudfront console.
In navigation pane, click cache statistics.
In statistics page, select start and end date to show statistics.
Select hourly (or) daily to show data charts.
Select location to show data from where the user is originated(or) select all locations.
Select the distribution to show data (or) select all distributions.
Click update.
You can download the statistics report.
Click on csv, while viewing the cache statistics report and save the file.
Cloudfront popular objects report = It displays list of most 50 popular objects within the
time period of last 60 days.
Go to cloudfront console.
In navigation pane, click popular objects.
Select start and end date.
Select distribution to display list of popular objects.
Click update.
Click on csv and save the file to download the report.
Cloudfront usage reports = displays you the cloudfront usage.
Go to cloudfront console.
In navigation pane, click usage reports.
Select start and end date.
Select billing region to display bill.
Select distribution (or) all distributions.
Click update.
Click on csv and save the file to download the report.
Cloudfront viewers reports = display four reports about the devices and browsers which
viewers are using to access cloudfront.
Devices, browsers, operating systems and locations.
Go to cloudfront console.
On navigation page, click viewers.
Select start and end date.
For grouping, select browsers (or) os.
For granularity, select data points to show per 1 hr (or) 1 day.
Select distribution (s).
Click update.
Click on csv, choose devices (or) devices trends to download the report.