CDN Flashcards
Characteristics of chaching in the servers
Caching in the servers:
1. does not reduce the latency incurred by client-server
communication;
2. does not reduce the number of request arriving at the
servers.
CDN
A content delivery network (CDN) is a distributed network of
edge servers that cache contents in point-of-presence (POP)
locations that are close to end users, to minimize latency.
CDN Benefits
Lower latency for clients, especially for applications in which
multiple round-trips are required to load content.
Large scaling to better handle instantaneous high loads, such
as the start of a product launch event.
Reduce the traffic sent to the origin server, as requests are
handled by the edge servers.
How does it work
1: Request forwarded to the
edge server (DNS returns
server based on the client
location).
2/3: If data is not in the
cache, it is requested to the
origin server.
4: The result is returned to
the client. The data is cached
according to a TTL.
Caching rules
Possible to define caching rules that affect:
* All requests;
* Request for given paths, extensions;
* Requests with given query string.
Possible caching rules include defining whether a page should
be cached or not, and the TTL for caching.
Route Optimization
Route optimization chooses the most optimal path to the origin
to guarantee that content is delivered to end users via the
fastest and most reliable route possible.
TCP Optimizations
Several optimizations to TCP to speedup communication.
Eliminating TCP slow start.
Leveraging persistent connections.
Tuning TCP packet parameters.
Object prefetch
Prefetch consists in retrieving images and scripts embedded in
the HTML page while the HTML is served to the browser, and
before the browser even makes these object requests.
When the client makes the requests for the linked assets, the
CDN edge server already has the requested objects and can
serve them immediately without a round trip to the origin
Adaptive image compression
This feature automatically monitors network quality, and
employs standard JPEG compression methods when network
speeds are slower to improve delivery time (e.g. for mobile
users).
Zone-based restriction
Allows to restrict access to content by country/region.
With geo-filtering, it is possible to create rules on specific paths
on the CDN endpoint to allow or block content in selected
countries/regions.
DDoS protection
A content delivery network provides DDoS protection by
design, by being able to absorb volumetric attacks. CDN also
include always-on traffic monitoring, and real-time mitigation of
common network-level attacks.