CDN
-- CDN Is useful in serving HTTP request
- CDN has been around since the late 90s .
- It was originally developed to speed up the delivery of Static HTML content for users all around the world.
- Nowadays CND must be used whenever http traffic is served
What can a Modern CDN do for us ?
At a fundamental level , a CDN bring content closer to the user . This improve performance of the webserver as perceived by the user.
It is well-documented that performance is critical to user engagement and retention.
To bring service closer to the user CDN deploys servers at hundreds of locations all over the world . These server locations are called Point of Presence or PoPs
A server inside a PoP is now commonly called an EdgeServer
Having many PoPs ensures that every user can reach a fast edge server close to them
Different CDNs use different technology to direct a user to their closed PoP.
With DNS Based routing each PoP has its own Ip Address . when the user looks up for the IP Address of the CDN DNS return the IP Address of the PoP closes to them
Each Edge Server acts as a reverse proxy with a huge content cache
If a piece is available in the cache it can be quickly returned to the user. Because the Edge Server only asks for the content from the server if it not in the cache. This greatly reduces the original load & bandwidth requirements on the original server.
A Modern CDN also can transform a static content into a more Optimized format.
for example if can minify JavaScript bundle on the fly. or transform an image file from an old format to a modern one like WebP and AVIF.
The EdgeServer also serves a very important role in HTTP stack . All TLS connection terminate at the EdgeServer .
TLS Handshakes are expensive they commonly use TLS version like 1.2 that takes serveral network round trips to establish.
But terminating the TLS connection at the EdgeServer significantly reduces the latency for the users to establish an encrypted TCP connection.
Modern CDN brings two more benefits first is security . All modern CDNs have huge capacity at the Edge . This is the key to providing effective DDOS protection against large scale attacks . Having a network with a capacity with much larger than the attackers.
This is especially effective with CDN built on an Anycast network .It allows CDN to diffuse traffic over a huge number of servers .

Comments
Post a Comment