AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configuring, Securing and Monitoring your Distribution (CTD301)

Amazon Web Services
Amazon Web ServicesAmazon Web Services
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Best Practices for Configuring, Securing, and
Monitoring Your Amazon CloudFront Distribution
Alec Peterson
General Manager, Amazon CloudFront
Anton Radlein
Software Development Manager, Amazon CloudFront
Cherie Wong
Sr. Software Development Manager, Amazon CloudFront
Efrain Fuentes
Enterprise Solutions Architect
CTD301
What to Expect from the Session
• How Amazon CloudFront delivers content
• Configuring your cache on CloudFront
• Measure application performance with real user
monitoring (RUM)
• Stop malicious viewers with CloudFront and AWS WAF
How CloudFront delivers
content
Definitions
• Viewer
• An end-user requesting content from CloudFront
• On a mobile device, desktop or other internet-connected
device
• CloudFront POP
• Point Of Presence, also referred to as an Edge Location
• Located in datacenters in major metropolitan areas, directly
connected to multiple ISPs
• Several racks of servers and network equipment, terminating
viewer connections
CloudFront delivering content
• Multiple identical (more or less) locations
• Location selection is critical
• Viewer perspective
• Latency
• Throughput
• CloudFront perspective
• Availability
• Capacity
• Location
What does ‘routing’ actually mean?
• Packet routing
• Purely destination-
based
• Limited ability to route
around congestion
What does ‘routing’ actually mean?
• Request routing
• Latency
• Throughput
• Capacity
• Geography
• Done at the DNS layer (or higher)
How does CloudFront perform routing?
CloudFront
edge
location
1.1.1.1
ISP NS
cloudfront.net
authoritative NS
viewer
(recursive lookup) distribution-id.cloudfront.net
(IP address of optimal CloudFront Edge location) 1.1.1.1
Primarily at the DNS layer
• Recursive resolver IP routing
What’s wrong with this picture?
What happened?
• A divergent resolver
• Resolvers that serve a wide set of users across many
networks/geographies
• VPN users
• Distributed corporate networks
• What can be done?
• Use a local resolver
• Use a resolver that supports EDNS0 ECS
What is EDNS0 client-subnet (ECS)?
• IETF open internet-draft
• Informational RFC 7871
• DNS query includes information about the network that
originated the query:
• First three octets of a IPv4 address commonly used
(1.2.3.0/24)
• No client-side resolver modifications necessary
• Some common open resolvers (such as Google’s 8.8.8.8
anycast resolver) support it
EDNS0 ECS-enabled DNS resolution
Key takeaways
• Where you are routed depends on many factors
• Network
• Geographic Location
• Individual POP status
• DNS is an imperfect request routing mechanism
• But it is also ubiquitous
• If your customers use ECS-enabled resolvers, their
experience will improve
Configuring your cache on
CloudFront
Why cache?
Two Laws:
1. Better performance for your viewers.
2. Less load on your origin.
What to expect
• What we do with a viewer request?
• How do we cache?
• Generating cache keys
• Managing your cache
• Setting Cache-Control headers
• Configuring your distribution and cache behaviors
• Additional Best Practices
• Versioning your assets
• Forwarding only required values
• Monitor your logs
Origin
IAD Edge
Cache
IAD12 ATL50 JFK1 JAX1
NRT Edge
Cache
NRT12 NRT53 NRT52 NRT20
Caching tiers
What happens with each request?
Is it in
cache?
Is it
expired?
Revalidate
with Origin
Origin
responds
with 304 (Not
Modified)
Origin
responds
with 200
(OK) and
latest version
of object
Forward
request to
origin
Y Y
NN
Viewer
Request
Hit / Refresh Hit
Miss
Cache
it
How do we generate a cache key?
Use the host header to create an internal canonical URL.
E.g., d123.cloudfront.net, example.com
Then…
- Remove query strings
- Remove the protocol
- Add accept-encoding (i.e., gzip, identity)
Managing your cache from your origin
Expires headers from origin
Expires reflects when the cache must go back to the origin
server to see if the object has changed.
It is a fixed point in time and accuracy relies on clock
synchronization.
< Expires: Fri, 1 Dec 2017 12:34:50 GMT
Cache-Control headers from origin
These directives give you fine-grained control over what is cached and
for how long (in seconds):
< Cache-Control: max-age=300
< Cache-Control: max-age=30, s-maxage=3600
Example: max-age=0, s-maxage=86400 for display ads
Browser
Shared Edge Cache
Cache-Control headers (examples)
Static Assets Login Landing
Pages
Live Streaming
Manifests
Media Fragments
*.css, *.js, images,
software
downloads
index.html /*.m3u8 /*.ts
Cache-
Control:
public; max-
age=31536000
Cache-
Control: no-
cache=Set-
Cookie; max-
age=30
Cache-
Control:
public; max-
age=2
Cache-
Control:
public; max-
age=31536000
Dynamic content? Cache it.
Use Cache-Control directives to minimize load on your origin:
- no-cache: cache & ask origin
- max-age=0: cache & ask origin
Other options:
- no-store: never cached at the edge nor by the browser
- private: never cached at the edge, but might be cached
by the browser
Managing your cache from CloudFront
Cache behaviors
on CloudFront
Specify caching configurations
based on URL path matching
(i.e., for different content).
Whatever you forward affects
your cache key. Use Trusted
Advisor checks!
Be wary of:
• Forwarded headers
• Query string forwarding
• Cookie forwarding
Set Min, Max, and Default TTLs for CloudFront
Min TTL Max TTLmax-age /
Expires
Browser Edge Cache
max-age /
s-maxage /
Expires
Max TTLmax-age /
Expires
max-age /
s-maxage /
Expires
Min TTL
Max TTL
max-age /
s-maxage /
Expires
Min TTLmax-age /
Expires
A couple tips…
Errors? Cache them too!
Cache and return a custom error
page and response code for each
HTTP error code.
Give your origin just the right
amount of time to recover.
Enable faster iteration of new styles without issuing invalidations.
Protect against browsers that don’t honor your Cache-Control headers.
<link
href="//assets.example.com/assets/v1/css/jumbotron-narrow.css“
rel="stylesheet">
<link
href="//assets.example.com/assets/v2/css/jumbotron-narrow.css“
rel="stylesheet">
<link
href="//assets.example.com/assets/css/jumbotron-
narrow.css?<md5sum>“
rel="stylesheet">
Version your assets
Minimize forwarded values
All forwarded headers are
used as part of the cache
key, which means it
dramatically reduces your
cacheability.
When in doubt, check the logs!
#Version: 1.0 #Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer)
cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-
taken x-forwarded-for ssl-protocol ssl-cipher x-edge-response-result-type cs-protocol-version
2014-05-23 01:13:11 FRA2 182 192.0.2.10 GET d111111abcdef8.cloudfront.net /view/my/file.html 200
www.displaymyfiles.com Mozilla/4.0%20(compatible;%20MSIE%205.0b1;%20Mac_PowerPC) - zip=98101 RefreshHit
MRVMF7KydIvxMWfJIglgwHQwZsbG2IhRJ07sn9AkKUFSHS9EXAMPLE== d111111abcdef8.cloudfront.net http - 0.001 - - - RefreshHit
HTTP/1.1
2014-05-23 01:13:12 LAX1 2390282 192.0.2.202 GET d111111abcdef8.cloudfront.net /soundtrack/happy.mp3 304
www.unknownsingers.com Mozilla/4.0%20(compatible;%20MSIE%207.0;%20Windows%20NT%205.1) a=b&c=d zip=50158 Hit
xGN7KWpVEmB9Dp7ctcVFQC4E-nrcOcEKS3QyAez--06dV7TEXAMPLE== d111111abcdef8.cloudfront.net http - 0.002 - - - Hit
HTTP/1.1
Log CloudFront request IDs
Nginx:
log_format main '$remote_addr - $remote_user
[$time_local] "$request" ‘ '$status
$body_bytes_sent "$http_referer" ‘
'"$http_user_agent" http_x_forwarded_for"
"$http_x_amz_cf_id"';
Apache:
LogFormat "%h %l %u %t "%r" %>s %b
"%{Referer}i" "%{User-Agent}i" "%{X-Amz-Cf-
Id}i"" combined
Key takeaways
• Set Cache-Control headers appropriately for your
content
• Cache dynamic content
• Create multiple cache behaviors and adapt
configurations for your content type, including errors
• Forward only required values
• Version your assets
• Log your request IDs!
Measure application
performance with RUM
Measure application performance with RUM
Synthetic monitoring vs. real user monitoring (RUM):
• Synthetic monitoring overview
• RUM overview
• When to use one over the other (baselining vs. gaining
situational insight)
What is synthetic monitoring?
Pros:
• Consistent signal of service health
• Easy to setup (kind of)
• Baseline performance
synthetic monitoring
configuration
synthetic
monitoring
portal
web application
simulated users
What is synthetic monitoring?
Pros:
• Consistent signal of service health
• Easy to setup (kind of)
• Baseline performance
synthetic monitoring
configuration
web application
simulated users
Where synthetic measurements go wrong
Cons:
• Network path to your application might not be representative
• Special cases and snowflakes
synthetic monitoring
configuration
web application
simulated usersreal
user
Where synthetic measurements go wrong
Cons:
• Network path to your application might not be representative
• Special cases and snowflakes
synthetic monitoring
configuration
web application
simulated usersreal
user
How do you feel about RUM?
web application
real users
script injected in
web page HTTP
response
RUM
provider
portal
• Script injected in web page
• Script beacons data back from the user’s browser session to the
RUM provider
• RUM provider portal aggregates the data for analysis
What can RUM tell you?
• What should my next optimization be?
• What is the cause of a loss of availability?
*Reference: https://developers.google.com
Network optimizations: connections
Connection definitions:
• Queueing – Time spent waiting to begin processing
• Stalled/Blocking – Total time spent in queue or proxying
• DNS lookup – Time taken to receive DNS records (like A or
AAAA)
• Initial connection – Inclusive of TCP handshake and negotiating
SSL
Network optimizations: requests
Request definitions:
• Request sent – HTTP request sent time
• TTFB - Time To first byte
• Content download – Time to last byte
Network optimizations: head of line blocking
Serialized requests could be your bottleneck due to head of line blocking in
HTTP 1.1 if you’re serving from the same origin!
Network optimizations: Key takeaways
Insights from this example:
• Evaluate your user-base
• Know your data
• Look at the right data
Optimizations:
• Use CloudFront!
• Origin as close to your end-users as possible (multi-region)
• HTTP/2
Best practices for configuring RUM on CloudFront
• Availability: Test your critical resources
• Index pages
• Video manifests
• Critical resources required for page load
• Performance: Capture Total Load time
• First-Byte latency is not always important. Know your content
and optimize on the appropriate dimension!
Stop malicious viewers with
CloudFront and AWS WAF
Securing your CloudFront distribution
• Leverage AWS WAF with preconfigured protections
• Configure CloudFront to serve private content
• Automate security response by using services like AWS
Lambda
• Leverage AWS Certificate Manager for SSL
AWS WAF
AWS WAF preconfigured protections
AWS WAF preconfigured protections
Access Handler
AWS WAF preconfigured protections
Log Parser
AWS WAF preconfigured protections
IP List Parser
AWS WAF preconfigured protections
http://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/
Private content – restrict origin access
Amazon S3
Origin Access Identify (OAI)
• Prevents direct access to your Amazon
S3 bucket
• Ensures performance benefits to all
customers
Custom origin
Block by IP address
• Whitelist only the Amazon CloudFront
IP range
• Protects origin from overload
• Ensures performance benefits to all
customers
Signed URLs
• Add signature to the Querystring in
URL
• Your URL changes
• Use to restrict access to individual
files
Signed Cookies
• Add signature to a cookie
• Your URL does not change
• Use to restrict access to multiple
files
Private content – signed URLs and cookies
Automate security response
• Subscribe to Amazon SNS notifications for changes to
IP ranges
• Automatically update security groups
AWS Lambda
Amazon CloudFront
Amazon SNS
Security group
Web app
server
Web app
serverAWS IP ranges
Update IP range
SNS message
https://github.com/awslabs/aws-cloudfront-samples
Leverage AWS Certificate Manager for SSL
Key takeaways
• Leverage AWS WAF
• Secure your origin and content
• Automate security response
Thank you!
Remember to complete
your evaluations!
1 de 62

Recomendados

Secure Content Delivery Using Amazon CloudFront por
Secure Content Delivery Using Amazon CloudFrontSecure Content Delivery Using Amazon CloudFront
Secure Content Delivery Using Amazon CloudFrontAmazon Web Services
2K vistas52 diapositivas
(STG206) Using Amazon CloudFront For Your Websites & Apps por
(STG206) Using Amazon CloudFront For Your Websites & Apps(STG206) Using Amazon CloudFront For Your Websites & Apps
(STG206) Using Amazon CloudFront For Your Websites & AppsAmazon Web Services
4.6K vistas53 diapositivas
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302) por
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)Amazon Web Services
1.2K vistas39 diapositivas
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205) por
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)
AWS re:Invent 2016: Born in the Cloud; Built Like a Startup (ARC205)Amazon Web Services
1.1K vistas70 diapositivas
Operating your Production API por
Operating your Production APIOperating your Production API
Operating your Production APIAmazon Web Services
1.2K vistas54 diapositivas
Compliance in the Cloud Using Security by Design por
Compliance in the Cloud Using Security by DesignCompliance in the Cloud Using Security by Design
Compliance in the Cloud Using Security by DesignAmazon Web Services
679 vistas28 diapositivas

Más contenido relacionado

La actualidad más candente

(CMP401) Elastic Load Balancing Deep Dive and Best Practices por
(CMP401) Elastic Load Balancing Deep Dive and Best Practices(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best PracticesAmazon Web Services
4.9K vistas64 diapositivas
Secure Content Delivery Using Amazon CloudFront and AWS WAF por
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFAmazon Web Services
3.7K vistas61 diapositivas
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016 por
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016Amazon Web Services Korea
3.9K vistas39 diapositivas
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront por
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFrontAWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFrontAmazon Web Services
17.5K vistas45 diapositivas
Build A Website on AWS for Your First 10 Million Users por
Build A Website on AWS for Your First 10 Million UsersBuild A Website on AWS for Your First 10 Million Users
Build A Website on AWS for Your First 10 Million UsersAmazon Web Services
6.5K vistas74 diapositivas
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo... por
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...Amazon Web Services
4.6K vistas113 diapositivas

La actualidad más candente(20)

(CMP401) Elastic Load Balancing Deep Dive and Best Practices por Amazon Web Services
(CMP401) Elastic Load Balancing Deep Dive and Best Practices(CMP401) Elastic Load Balancing Deep Dive and Best Practices
(CMP401) Elastic Load Balancing Deep Dive and Best Practices
Amazon Web Services4.9K vistas
Secure Content Delivery Using Amazon CloudFront and AWS WAF por Amazon Web Services
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Amazon Web Services3.7K vistas
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016 por Amazon Web Services Korea
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016
Media Service on a Cloud :: 콘텐츠연합플랫폼 :: AWS Media Day 2016
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront por Amazon Web Services
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFrontAWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
Amazon Web Services17.5K vistas
Build A Website on AWS for Your First 10 Million Users por Amazon Web Services
Build A Website on AWS for Your First 10 Million UsersBuild A Website on AWS for Your First 10 Million Users
Build A Website on AWS for Your First 10 Million Users
Amazon Web Services6.5K vistas
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo... por Amazon Web Services
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
Amazon Web Services4.6K vistas
AWS re:Invent 2016: Searching Inside Video at Petabyte Scale Using Spot (WIN307) por Amazon Web Services
AWS re:Invent 2016: Searching Inside Video at Petabyte Scale Using Spot (WIN307)AWS re:Invent 2016: Searching Inside Video at Petabyte Scale Using Spot (WIN307)
AWS re:Invent 2016: Searching Inside Video at Petabyte Scale Using Spot (WIN307)
Amazon Web Services744 vistas
Being Well Architected in the Cloud (Updated) por Adrian Hornsby
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)
Adrian Hornsby436 vistas
Scale Your Application while Improving Performance and Lowering Costs (SVC203... por Amazon Web Services
Scale Your Application while Improving Performance and Lowering Costs (SVC203...Scale Your Application while Improving Performance and Lowering Costs (SVC203...
Scale Your Application while Improving Performance and Lowering Costs (SVC203...
Amazon Web Services8.8K vistas
(WEB302) Best Practices for Running WordPress on AWS | AWS re:Invent 2014 por Amazon Web Services
(WEB302) Best Practices for Running WordPress on AWS | AWS re:Invent 2014(WEB302) Best Practices for Running WordPress on AWS | AWS re:Invent 2014
(WEB302) Best Practices for Running WordPress on AWS | AWS re:Invent 2014
Amazon Web Services14.2K vistas
AWS WAF introduction and live demo - Pop-up Loft Tel Aviv por Amazon Web Services
AWS WAF introduction and live demo - Pop-up Loft Tel AvivAWS WAF introduction and live demo - Pop-up Loft Tel Aviv
AWS WAF introduction and live demo - Pop-up Loft Tel Aviv
Amazon Web Services2.4K vistas
SRV206 Getting Started with Amazon CloudFront Content Delivery Network por Amazon Web Services
SRV206 Getting Started with Amazon CloudFront Content Delivery NetworkSRV206 Getting Started with Amazon CloudFront Content Delivery Network
SRV206 Getting Started with Amazon CloudFront Content Delivery Network
Amazon Web Services1.5K vistas
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options por Amazon Web Services
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity OptionsCreating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Amazon Web Services721 vistas
AWS re:Invent 2016: Discovery Channel's Broadcast Workflows and Channel Origi... por Amazon Web Services
AWS re:Invent 2016: Discovery Channel's Broadcast Workflows and Channel Origi...AWS re:Invent 2016: Discovery Channel's Broadcast Workflows and Channel Origi...
AWS re:Invent 2016: Discovery Channel's Broadcast Workflows and Channel Origi...
Amazon Web Services3.4K vistas
AWS re:Invent 2016: VMware and AWS Together - VMware Cloud on AWS (ENT317) por Amazon Web Services
AWS re:Invent 2016: VMware and AWS Together - VMware Cloud on AWS (ENT317)AWS re:Invent 2016: VMware and AWS Together - VMware Cloud on AWS (ENT317)
AWS re:Invent 2016: VMware and AWS Together - VMware Cloud on AWS (ENT317)
Amazon Web Services2.9K vistas
Next-Generation Firewall Services VPC Integration por Amazon Web Services
Next-Generation Firewall Services VPC IntegrationNext-Generation Firewall Services VPC Integration
Next-Generation Firewall Services VPC Integration
Amazon Web Services1.5K vistas
AWS re:Invent 2016: Media Delivery from the Cloud: Integrated AWS Solutions f... por Amazon Web Services
AWS re:Invent 2016: Media Delivery from the Cloud: Integrated AWS Solutions f...AWS re:Invent 2016: Media Delivery from the Cloud: Integrated AWS Solutions f...
AWS re:Invent 2016: Media Delivery from the Cloud: Integrated AWS Solutions f...
Amazon Web Services1.4K vistas

Destacado

(STG205) Secure Content Delivery Using Amazon CloudFront por
(STG205) Secure Content Delivery Using Amazon CloudFront(STG205) Secure Content Delivery Using Amazon CloudFront
(STG205) Secure Content Delivery Using Amazon CloudFrontAmazon Web Services
3.3K vistas58 diapositivas
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon... por
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...Amazon Web Services
7.2K vistas137 diapositivas
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302) por
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)Amazon Web Services
1.8K vistas54 diapositivas
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec... por
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...Amazon Web Services
9.1K vistas69 diapositivas
NEW LAUNCH! Serverless Apps with AWS Step Functions por
NEW LAUNCH! Serverless Apps with AWS Step FunctionsNEW LAUNCH! Serverless Apps with AWS Step Functions
NEW LAUNCH! Serverless Apps with AWS Step FunctionsAmazon Web Services
1.6K vistas49 diapositivas
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211) por
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)Amazon Web Services
2.1K vistas104 diapositivas

Destacado(20)

(STG205) Secure Content Delivery Using Amazon CloudFront por Amazon Web Services
(STG205) Secure Content Delivery Using Amazon CloudFront(STG205) Secure Content Delivery Using Amazon CloudFront
(STG205) Secure Content Delivery Using Amazon CloudFront
Amazon Web Services3.3K vistas
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon... por Amazon Web Services
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...
Dynamic Content Acceleration: Fast Web Apps with Amazon CloudFront and Amazon...
Amazon Web Services7.2K vistas
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302) por Amazon Web Services
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)
AWS re:Invent 2016: Automated Governance of Your AWS Resources (DEV302)
Amazon Web Services1.8K vistas
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec... por Amazon Web Services
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...
AWS re:Invent 2016: Netflix: Using Amazon S3 as the fabric of our big data ec...
Amazon Web Services9.1K vistas
NEW LAUNCH! Serverless Apps with AWS Step Functions por Amazon Web Services
NEW LAUNCH! Serverless Apps with AWS Step FunctionsNEW LAUNCH! Serverless Apps with AWS Step Functions
NEW LAUNCH! Serverless Apps with AWS Step Functions
Amazon Web Services1.6K vistas
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211) por Amazon Web Services
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
Amazon Web Services2.1K vistas
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC... por Amazon Web Services
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
Amazon Web Services10.4K vistas
(NET406) Deep Dive: AWS Direct Connect and VPNs por Amazon Web Services
(NET406) Deep Dive: AWS Direct Connect and VPNs(NET406) Deep Dive: AWS Direct Connect and VPNs
(NET406) Deep Dive: AWS Direct Connect and VPNs
Amazon Web Services37.7K vistas
Making (Almost) Any Database Faster and Cheaper with Caching por Amazon Web Services
Making (Almost) Any Database Faster and Cheaper with CachingMaking (Almost) Any Database Faster and Cheaper with Caching
Making (Almost) Any Database Faster and Cheaper with Caching
Amazon Web Services2.8K vistas
Visão estratégica de como migrar para a cloud por Amazon Web Services
Visão estratégica de como migrar para a cloudVisão estratégica de como migrar para a cloud
Visão estratégica de como migrar para a cloud
Amazon Web Services1.5K vistas
Developing Connected Applications with Amazon Web Services IoT por Amazon Web Services
Developing Connected Applications with Amazon Web Services IoTDeveloping Connected Applications with Amazon Web Services IoT
Developing Connected Applications with Amazon Web Services IoT
Amazon CloudFront Best Practices and Anti-patterns por Abhishek Tiwari
Amazon CloudFront  Best Practices and Anti-patternsAmazon CloudFront  Best Practices and Anti-patterns
Amazon CloudFront Best Practices and Anti-patterns
Abhishek Tiwari3.3K vistas
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic... por Amazon Web Services
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
(SDD302) A Tale of One Thousand Instances - Migrating from Amazon EC2-Classic...
Amazon Web Services6.9K vistas
Modern Monitoring - devops roadtrip por bridgetkromhout
Modern Monitoring - devops roadtripModern Monitoring - devops roadtrip
Modern Monitoring - devops roadtrip
bridgetkromhout326 vistas
Site24x7 PHP Monitoring for DevOps por Site24x7
Site24x7 PHP Monitoring for DevOpsSite24x7 PHP Monitoring for DevOps
Site24x7 PHP Monitoring for DevOps
Site24x71.2K vistas

Similar a AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configuring, Securing and Monitoring your Distribution (CTD301)

Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T... por
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Amazon Web Services
4.5K vistas60 diapositivas
Web Speed And Scalability por
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
789 vistas24 diapositivas
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ... por
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Amazon Web Services
4.4K vistas160 diapositivas
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A... por
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...Ram G Athreya
719 vistas44 diapositivas
Stay productive_while_slicing_up_the_monolith por
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
592 vistas38 diapositivas
Stay productive while slicing up the monolith por
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
438 vistas42 diapositivas

Similar a AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configuring, Securing and Monitoring your Distribution (CTD301)(20)

Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T... por Amazon Web Services
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Amazon Web Services4.5K vistas
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ... por Amazon Web Services
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Amazon Web Services4.4K vistas
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A... por Ram G Athreya
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...
Ram G Athreya719 vistas
Stay productive_while_slicing_up_the_monolith por Markus Eisele
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
Markus Eisele592 vistas
Stay productive while slicing up the monolith por Markus Eisele
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele438 vistas
MongoDB World 2019: Why NBCUniversal Migrated to MongoDB Atlas por MongoDB
MongoDB World 2019: Why NBCUniversal Migrated to MongoDB AtlasMongoDB World 2019: Why NBCUniversal Migrated to MongoDB Atlas
MongoDB World 2019: Why NBCUniversal Migrated to MongoDB Atlas
MongoDB426 vistas
PowerShell DSC - State of the Art & Community by Gael Colas por UK DevOps Collective
PowerShell DSC - State of the Art & Community by Gael ColasPowerShell DSC - State of the Art & Community by Gael Colas
PowerShell DSC - State of the Art & Community by Gael Colas
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ... por Amazon Web Services
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Amazon Web Services11.7K vistas
Cloud computing 3702 por Jess Coburn
Cloud computing 3702Cloud computing 3702
Cloud computing 3702
Jess Coburn380 vistas
AWS Summit London 2014 | Dynamic Content Acceleration (300) por Amazon Web Services
AWS Summit London 2014 | Dynamic Content Acceleration (300)AWS Summit London 2014 | Dynamic Content Acceleration (300)
AWS Summit London 2014 | Dynamic Content Acceleration (300)
Amazon Web Services50.6K vistas
Building a SaaS using WSO2 Stratos por WSO2
Building a SaaS using WSO2 StratosBuilding a SaaS using WSO2 Stratos
Building a SaaS using WSO2 Stratos
WSO21.9K vistas
Delivering Mobile Apps That Perform por Ruben Goncalves
Delivering Mobile Apps That PerformDelivering Mobile Apps That Perform
Delivering Mobile Apps That Perform
Ruben Goncalves302 vistas
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018 por Amazon Web Services Korea
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Monitoring in Motion: Monitoring Containers and Amazon ECS por Amazon Web Services
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECS
Amazon Web Services6.5K vistas

Más de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn... por
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
26.5K vistas46 diapositivas
Big Data per le Startup: come creare applicazioni Big Data in modalità Server... por
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
5.6K vistas44 diapositivas
Esegui pod serverless con Amazon EKS e AWS Fargate por
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
4.1K vistas62 diapositivas
Costruire Applicazioni Moderne con AWS por
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
2.8K vistas61 diapositivas
Come spendere fino al 90% in meno con i container e le istanze spot por
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
1.8K vistas21 diapositivas
Open banking as a service por
Open banking as a serviceOpen banking as a service
Open banking as a serviceAmazon Web Services
7.1K vistas14 diapositivas

Más de Amazon Web Services(20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn... por Amazon Web Services
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Amazon Web Services26.5K vistas
Big Data per le Startup: come creare applicazioni Big Data in modalità Server... por Amazon Web Services
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Amazon Web Services5.6K vistas
Esegui pod serverless con Amazon EKS e AWS Fargate por Amazon Web Services
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
Amazon Web Services4.1K vistas
Come spendere fino al 90% in meno con i container e le istanze spot por Amazon Web Services
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
Amazon Web Services1.8K vistas
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea... por Amazon Web Services
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Amazon Web Services3.3K vistas
OpsWorks Configuration Management: automatizza la gestione e i deployment del... por Amazon Web Services
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
Amazon Web Services2.6K vistas
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads por Amazon Web Services
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Amazon Web Services1.7K vistas
Database Oracle e VMware Cloud on AWS i miti da sfatare por Amazon Web Services
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
Amazon Web Services1.3K vistas
Crea la tua prima serverless ledger-based app con QLDB e NodeJS por Amazon Web Services
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Amazon Web Services1.9K vistas
API moderne real-time per applicazioni mobili e web por Amazon Web Services
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
Amazon Web Services1.5K vistas
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare por Amazon Web Services
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Amazon Web Services1.5K vistas
AWS_HK_StartupDay_Building Interactive websites while automating for efficien... por Amazon Web Services
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services672 vistas
Introduzione a Amazon Elastic Container Service por Amazon Web Services
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services2.7K vistas

Último

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive por
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
34 vistas35 diapositivas
Democratising digital commerce in India-Report por
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-ReportKapil Khandelwal (KK)
18 vistas161 diapositivas
Five Things You SHOULD Know About Postman por
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
36 vistas43 diapositivas
SAP Automation Using Bar Code and FIORI.pdf por
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
23 vistas38 diapositivas
Network Source of Truth and Infrastructure as Code revisited por
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
27 vistas45 diapositivas
Design Driven Network Assurance por
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
15 vistas42 diapositivas

Último(20)

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive por Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Five Things You SHOULD Know About Postman por Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman36 vistas
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP23 vistas
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 por IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Powerful Google developer tools for immediate impact! (2023-24) por wesley chun
Powerful Google developer tools for immediate impact! (2023-24)Powerful Google developer tools for immediate impact! (2023-24)
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun10 vistas
6g - REPORT.pdf por Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 vistas
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... por Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Jasper Oosterveld19 vistas
Ransomware is Knocking your Door_Final.pdf por Security Bootcamp
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp59 vistas
Special_edition_innovator_2023.pdf por WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 vistas
Piloting & Scaling Successfully With Microsoft Viva por Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Richard Harbridge12 vistas

AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configuring, Securing and Monitoring your Distribution (CTD301)

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Best Practices for Configuring, Securing, and Monitoring Your Amazon CloudFront Distribution Alec Peterson General Manager, Amazon CloudFront Anton Radlein Software Development Manager, Amazon CloudFront Cherie Wong Sr. Software Development Manager, Amazon CloudFront Efrain Fuentes Enterprise Solutions Architect CTD301
  • 2. What to Expect from the Session • How Amazon CloudFront delivers content • Configuring your cache on CloudFront • Measure application performance with real user monitoring (RUM) • Stop malicious viewers with CloudFront and AWS WAF
  • 4. Definitions • Viewer • An end-user requesting content from CloudFront • On a mobile device, desktop or other internet-connected device • CloudFront POP • Point Of Presence, also referred to as an Edge Location • Located in datacenters in major metropolitan areas, directly connected to multiple ISPs • Several racks of servers and network equipment, terminating viewer connections
  • 5. CloudFront delivering content • Multiple identical (more or less) locations • Location selection is critical • Viewer perspective • Latency • Throughput • CloudFront perspective • Availability • Capacity • Location
  • 6. What does ‘routing’ actually mean? • Packet routing • Purely destination- based • Limited ability to route around congestion
  • 7. What does ‘routing’ actually mean? • Request routing • Latency • Throughput • Capacity • Geography • Done at the DNS layer (or higher)
  • 8. How does CloudFront perform routing? CloudFront edge location 1.1.1.1 ISP NS cloudfront.net authoritative NS viewer (recursive lookup) distribution-id.cloudfront.net (IP address of optimal CloudFront Edge location) 1.1.1.1 Primarily at the DNS layer • Recursive resolver IP routing
  • 9. What’s wrong with this picture?
  • 10. What happened? • A divergent resolver • Resolvers that serve a wide set of users across many networks/geographies • VPN users • Distributed corporate networks • What can be done? • Use a local resolver • Use a resolver that supports EDNS0 ECS
  • 11. What is EDNS0 client-subnet (ECS)? • IETF open internet-draft • Informational RFC 7871 • DNS query includes information about the network that originated the query: • First three octets of a IPv4 address commonly used (1.2.3.0/24) • No client-side resolver modifications necessary • Some common open resolvers (such as Google’s 8.8.8.8 anycast resolver) support it
  • 12. EDNS0 ECS-enabled DNS resolution
  • 13. Key takeaways • Where you are routed depends on many factors • Network • Geographic Location • Individual POP status • DNS is an imperfect request routing mechanism • But it is also ubiquitous • If your customers use ECS-enabled resolvers, their experience will improve
  • 14. Configuring your cache on CloudFront
  • 15. Why cache? Two Laws: 1. Better performance for your viewers. 2. Less load on your origin.
  • 16. What to expect • What we do with a viewer request? • How do we cache? • Generating cache keys • Managing your cache • Setting Cache-Control headers • Configuring your distribution and cache behaviors • Additional Best Practices • Versioning your assets • Forwarding only required values • Monitor your logs
  • 17. Origin IAD Edge Cache IAD12 ATL50 JFK1 JAX1 NRT Edge Cache NRT12 NRT53 NRT52 NRT20 Caching tiers
  • 18. What happens with each request? Is it in cache? Is it expired? Revalidate with Origin Origin responds with 304 (Not Modified) Origin responds with 200 (OK) and latest version of object Forward request to origin Y Y NN Viewer Request Hit / Refresh Hit Miss Cache it
  • 19. How do we generate a cache key? Use the host header to create an internal canonical URL. E.g., d123.cloudfront.net, example.com Then… - Remove query strings - Remove the protocol - Add accept-encoding (i.e., gzip, identity)
  • 20. Managing your cache from your origin
  • 21. Expires headers from origin Expires reflects when the cache must go back to the origin server to see if the object has changed. It is a fixed point in time and accuracy relies on clock synchronization. < Expires: Fri, 1 Dec 2017 12:34:50 GMT
  • 22. Cache-Control headers from origin These directives give you fine-grained control over what is cached and for how long (in seconds): < Cache-Control: max-age=300 < Cache-Control: max-age=30, s-maxage=3600 Example: max-age=0, s-maxage=86400 for display ads Browser Shared Edge Cache
  • 23. Cache-Control headers (examples) Static Assets Login Landing Pages Live Streaming Manifests Media Fragments *.css, *.js, images, software downloads index.html /*.m3u8 /*.ts Cache- Control: public; max- age=31536000 Cache- Control: no- cache=Set- Cookie; max- age=30 Cache- Control: public; max- age=2 Cache- Control: public; max- age=31536000
  • 24. Dynamic content? Cache it. Use Cache-Control directives to minimize load on your origin: - no-cache: cache & ask origin - max-age=0: cache & ask origin Other options: - no-store: never cached at the edge nor by the browser - private: never cached at the edge, but might be cached by the browser
  • 25. Managing your cache from CloudFront
  • 26. Cache behaviors on CloudFront Specify caching configurations based on URL path matching (i.e., for different content). Whatever you forward affects your cache key. Use Trusted Advisor checks! Be wary of: • Forwarded headers • Query string forwarding • Cookie forwarding
  • 27. Set Min, Max, and Default TTLs for CloudFront Min TTL Max TTLmax-age / Expires Browser Edge Cache max-age / s-maxage / Expires Max TTLmax-age / Expires max-age / s-maxage / Expires Min TTL Max TTL max-age / s-maxage / Expires Min TTLmax-age / Expires
  • 29. Errors? Cache them too! Cache and return a custom error page and response code for each HTTP error code. Give your origin just the right amount of time to recover.
  • 30. Enable faster iteration of new styles without issuing invalidations. Protect against browsers that don’t honor your Cache-Control headers. <link href="//assets.example.com/assets/v1/css/jumbotron-narrow.css“ rel="stylesheet"> <link href="//assets.example.com/assets/v2/css/jumbotron-narrow.css“ rel="stylesheet"> <link href="//assets.example.com/assets/css/jumbotron- narrow.css?<md5sum>“ rel="stylesheet"> Version your assets
  • 31. Minimize forwarded values All forwarded headers are used as part of the cache key, which means it dramatically reduces your cacheability.
  • 32. When in doubt, check the logs! #Version: 1.0 #Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time- taken x-forwarded-for ssl-protocol ssl-cipher x-edge-response-result-type cs-protocol-version 2014-05-23 01:13:11 FRA2 182 192.0.2.10 GET d111111abcdef8.cloudfront.net /view/my/file.html 200 www.displaymyfiles.com Mozilla/4.0%20(compatible;%20MSIE%205.0b1;%20Mac_PowerPC) - zip=98101 RefreshHit MRVMF7KydIvxMWfJIglgwHQwZsbG2IhRJ07sn9AkKUFSHS9EXAMPLE== d111111abcdef8.cloudfront.net http - 0.001 - - - RefreshHit HTTP/1.1 2014-05-23 01:13:12 LAX1 2390282 192.0.2.202 GET d111111abcdef8.cloudfront.net /soundtrack/happy.mp3 304 www.unknownsingers.com Mozilla/4.0%20(compatible;%20MSIE%207.0;%20Windows%20NT%205.1) a=b&c=d zip=50158 Hit xGN7KWpVEmB9Dp7ctcVFQC4E-nrcOcEKS3QyAez--06dV7TEXAMPLE== d111111abcdef8.cloudfront.net http - 0.002 - - - Hit HTTP/1.1
  • 33. Log CloudFront request IDs Nginx: log_format main '$remote_addr - $remote_user [$time_local] "$request" ‘ '$status $body_bytes_sent "$http_referer" ‘ '"$http_user_agent" http_x_forwarded_for" "$http_x_amz_cf_id"'; Apache: LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" "%{X-Amz-Cf- Id}i"" combined
  • 34. Key takeaways • Set Cache-Control headers appropriately for your content • Cache dynamic content • Create multiple cache behaviors and adapt configurations for your content type, including errors • Forward only required values • Version your assets • Log your request IDs!
  • 36. Measure application performance with RUM Synthetic monitoring vs. real user monitoring (RUM): • Synthetic monitoring overview • RUM overview • When to use one over the other (baselining vs. gaining situational insight)
  • 37. What is synthetic monitoring? Pros: • Consistent signal of service health • Easy to setup (kind of) • Baseline performance synthetic monitoring configuration synthetic monitoring portal web application simulated users
  • 38. What is synthetic monitoring? Pros: • Consistent signal of service health • Easy to setup (kind of) • Baseline performance synthetic monitoring configuration web application simulated users
  • 39. Where synthetic measurements go wrong Cons: • Network path to your application might not be representative • Special cases and snowflakes synthetic monitoring configuration web application simulated usersreal user
  • 40. Where synthetic measurements go wrong Cons: • Network path to your application might not be representative • Special cases and snowflakes synthetic monitoring configuration web application simulated usersreal user
  • 41. How do you feel about RUM? web application real users script injected in web page HTTP response RUM provider portal • Script injected in web page • Script beacons data back from the user’s browser session to the RUM provider • RUM provider portal aggregates the data for analysis
  • 42. What can RUM tell you? • What should my next optimization be? • What is the cause of a loss of availability? *Reference: https://developers.google.com
  • 43. Network optimizations: connections Connection definitions: • Queueing – Time spent waiting to begin processing • Stalled/Blocking – Total time spent in queue or proxying • DNS lookup – Time taken to receive DNS records (like A or AAAA) • Initial connection – Inclusive of TCP handshake and negotiating SSL
  • 44. Network optimizations: requests Request definitions: • Request sent – HTTP request sent time • TTFB - Time To first byte • Content download – Time to last byte
  • 45. Network optimizations: head of line blocking Serialized requests could be your bottleneck due to head of line blocking in HTTP 1.1 if you’re serving from the same origin!
  • 46. Network optimizations: Key takeaways Insights from this example: • Evaluate your user-base • Know your data • Look at the right data Optimizations: • Use CloudFront! • Origin as close to your end-users as possible (multi-region) • HTTP/2
  • 47. Best practices for configuring RUM on CloudFront • Availability: Test your critical resources • Index pages • Video manifests • Critical resources required for page load • Performance: Capture Total Load time • First-Byte latency is not always important. Know your content and optimize on the appropriate dimension!
  • 48. Stop malicious viewers with CloudFront and AWS WAF
  • 49. Securing your CloudFront distribution • Leverage AWS WAF with preconfigured protections • Configure CloudFront to serve private content • Automate security response by using services like AWS Lambda • Leverage AWS Certificate Manager for SSL
  • 51. AWS WAF preconfigured protections
  • 52. AWS WAF preconfigured protections Access Handler
  • 53. AWS WAF preconfigured protections Log Parser
  • 54. AWS WAF preconfigured protections IP List Parser
  • 55. AWS WAF preconfigured protections http://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/
  • 56. Private content – restrict origin access Amazon S3 Origin Access Identify (OAI) • Prevents direct access to your Amazon S3 bucket • Ensures performance benefits to all customers Custom origin Block by IP address • Whitelist only the Amazon CloudFront IP range • Protects origin from overload • Ensures performance benefits to all customers
  • 57. Signed URLs • Add signature to the Querystring in URL • Your URL changes • Use to restrict access to individual files Signed Cookies • Add signature to a cookie • Your URL does not change • Use to restrict access to multiple files Private content – signed URLs and cookies
  • 58. Automate security response • Subscribe to Amazon SNS notifications for changes to IP ranges • Automatically update security groups AWS Lambda Amazon CloudFront Amazon SNS Security group Web app server Web app serverAWS IP ranges Update IP range SNS message https://github.com/awslabs/aws-cloudfront-samples
  • 59. Leverage AWS Certificate Manager for SSL
  • 60. Key takeaways • Leverage AWS WAF • Secure your origin and content • Automate security response