How CDN Works | System Design

  Рет қаралды 26,473

ByteMonk

Жыл бұрын

In this video, we'll take a look into how CDN works and how it can help improve website performance, reduce load times, enhance user experience and the significance of understanding it in the context of your system design interviews.
A content delivery network (CDN) is a distributed network of servers that work together to deliver web content to users based on their geographic location. By caching website content on multiple servers, a CDN can reduce the distance between users and the servers hosting the content, resulting in faster load times and a more seamless browsing experience.
I will cover the technical aspects of CDN, including how it works and the benefits it provides for website owners and users alike. We'll also touch on some of the top CDN providers in the market today, including Amazon CloudFront, Cloudflare, and Akamai.
If you're looking to improve your website's performance and enhance your user experience, this video is a must-watch. Join us as we explore the world of CDN and discover the power of content delivery networks.
List of popular CDN (Content Delivery Network) providers:
Amazon CloudFront
Cloudflare
Akamai
Google Cloud CDN
Fastly
Max CDN
Limelight Networks
StackPath
Microsoft Azure CDN
CDN77
KeyCDN
#cdn #faang
System Design Interview Basics Playlist:
►kzfaq.info/sun/PLJq-63ZRPdBt423WbyAD1YZO0Ljo1pzvY
AWS Certification:
►AWS Certified Cloud Practioner: kzfaq.info/get/bejne/raxho8-V0LfWf40.html
►AWS Certified Solution Architect Associate: kzfaq.info/get/bejne/feCfoLt_sazLm58.html
►AWS Certified Solution Architect Professional: kzfaq.info/get/bejne/gayKpaWpuKedpH0.html

Пікірлер: 36
@abhishekguitarist
@abhishekguitarist 4 ай бұрын
I watched a ton of videos on CDN and kept ignoring this one caused it was just 6 mins. But guess what, these 6 mins are just enough!!! Thanks.
@fatcat22able
@fatcat22able Жыл бұрын
This channel deserves more attention, absolutely awesome wealth of system design knowledge 🙌
@ByteMonk
@ByteMonk Жыл бұрын
I appreciate the words of encouragement; comments like yours provide the necessary fuel to keep me going.
@ritwik121
@ritwik121 Жыл бұрын
True
@quiccloud
@quiccloud 4 ай бұрын
This is a really good illustration of how a CDN works with enough details to fully understand the concept of CDNs like ours. You channel def. deserves more attention.
@ByteMonk
@ByteMonk 4 ай бұрын
thank you for the appreciation ❤ Yes, my goal has been to provide just "enough details" :)
@stephan24297
@stephan24297 Жыл бұрын
very informative and easy to understand. also a good pace 👏thanks for the upload
@hashcoeur
@hashcoeur 11 ай бұрын
Very nice bro. Thanks for this amazing content
@vinayakpatil5214
@vinayakpatil5214 11 ай бұрын
other videos actually cant explain backend working of cdn, but this made my doubts clear! thank u
@ByteMonk
@ByteMonk 10 ай бұрын
Glad to hear that!
@amitsri
@amitsri 2 ай бұрын
Thank you for sharing such informative content with such visually appealing presentations. I'm a new subscriber to your channel and really appreciate the effort you put into your videos. Thank you so much! Keep up the great work!
@ByteMonk
@ByteMonk 2 ай бұрын
Thank you for the support ❤️
@Bavtomar
@Bavtomar Ай бұрын
very helpful thanks
@meditationdanny701
@meditationdanny701 Жыл бұрын
Awsome 🎉
@denizyakut7633
@denizyakut7633 5 ай бұрын
Hİ,firstly thank you for clear explanation. Could you please share a documant about this explanation ?
@filipniklas
@filipniklas 11 ай бұрын
What about web apps that are interactive? Let's say they have parts of a website that loads in based on data that is fetched from a database, which itself is frequently updated. Is this something that gets cached on a CDN or does CDN only cache static, non-interactive data? Great video, by the way. Cheers
@ByteMonk
@ByteMonk 11 ай бұрын
When it comes to interactive web apps with parts that load data from a database, CDNs can cache the dynamic content to a certain extent. However, caching dynamic content requires careful configuration to ensure that users receive up-to-date information while still benefiting from the CDN's performance improvements. CDNs can effectively cache static assets like images, CSS, JavaScript files, and even some HTML files. These resources typically don't change frequently and can be served from the CDN's cache, reducing the load on the origin server and improving page load times for users. For dynamic content that varies based on user interactions or frequent updates, CDNs can implement different caching strategies. Some CDNs offer features like edge caching, which caches dynamic responses at the CDN's edge servers. This allows the CDN to serve cached dynamic content for a specific period before revalidating with the origin server. Furthermore, the web application's server can use Cache-Control headers and other HTTP headers to specify how the CDN should handle caching for dynamic content. By using appropriate Cache-Control directives, the server can control caching behavior, allowing the CDN to cache certain responses for a limited time or avoid caching altogether when needed. Some CDNs support Edge Side Includes, a mechanism that enables selective caching of dynamic content. ESI allows parts of a web page to be cached separately, allowing the CDN to serve static elements and request only the dynamic portions from the origin server. While CDNs can cache dynamic content, they may not cache personalized content for individual users as it's specific to each user's session. For such personalized content, the application may need to handle caching and data fetching at the server-side or use other technologies like client-side caching with JavaScript.
@filipniklas
@filipniklas 11 ай бұрын
@@ByteMonk Cheers mate, appreciate the thorough response!
@apostoloskou
@apostoloskou Жыл бұрын
That's a great explanation! Thank you! However I know that there is also a way with Anycast IP to discover the closest CDN edge server. Do you know how it works with Anycast IP? Thank you in advance!
@ByteMonk
@ByteMonk Жыл бұрын
Thank you and that's correct, by utilizing Anycast IP routing, CDNs can direct users to the closest edge server, reducing latency and improving content delivery performance. The routing infrastructure and BGP play a crucial role in enabling this efficient traffic distribution across the CDN's network. With Anycast IP, Each CDN edge server is assigned the same Anycast IP address. This means that multiple servers share the same IP address but are located in different geographical locations. Border Gateway Protocol (BGP) is used to propagate routing information across the Internet. CDN providers work with network service providers (ISPs) to announce the IP prefix (range) associated with their CDN edge servers. These announcements are propagated through BGP, allowing the CDN's IP prefix to be reachable from multiple locations. The ISP's routers then compare the destination IP address of the request with their routing tables. Since the Anycast IP address is announced by multiple CDN edge servers, the router selects the path to the nearest edge server based on the network topology and routing metrics, such as the shortest AS (Autonomous System) path or the lowest network latency. Once the ISP's router determines the closest edge server based on the Anycast IP routing, it forwards the user's request to that specific edge server. Reference: datatracker.ietf.org/doc/html/rfc4786
@hashcoeur
@hashcoeur 11 ай бұрын
@@ByteMonk thanks again for sharing the knowledge, you helped me a lot.
@srinu02cn30
@srinu02cn30 5 ай бұрын
Does anyone know how to migrate one application from one CDN to another?
@sumitbhardwaj5354
@sumitbhardwaj5354 Жыл бұрын
Could you please tell from where you have studied cdn working? I have lots of doubt that need to be clear.
@sumitbhardwaj5354
@sumitbhardwaj5354 Жыл бұрын
Thanks you sir for taking me one step ahead to cdn work flow...
@ByteMonk
@ByteMonk Жыл бұрын
this is mainly based on my experience with CDN, but feel free to ask CDN related questions here
@sumitbhardwaj5354
@sumitbhardwaj5354 Жыл бұрын
@@ByteMonk Actually I wanted to ask you that what happens to cdn if we update application version in server where in cnd cached data is not expire
@ByteMonk
@ByteMonk Жыл бұрын
@@sumitbhardwaj5354 If you update the application version on your server while the CDN-cached data is still not expired, then there is a chance that users may experience unexpected behavior or errors when accessing your application through the CDN. This is because the CDN will continue to serve the cached version of the application until the cache expires, even if the version on the server has been updated. This means that users may be interacting with an outdated version of the application that no longer matches the updated version on your server. To avoid this issue, you can either wait for the cached data to expire before updating the application version on your server, or you can manually invalidate the cached data in the CDN to force it to fetch the updated version from your server. The latter approach may cause a temporary increase in server load as the CDN requests the updated content from your server.
@sumitbhardwaj5354
@sumitbhardwaj5354 Жыл бұрын
@@ByteMonk Thanks sir
@XtopMailer-es5sv
@XtopMailer-es5sv Жыл бұрын
i got a lot of email traffic from a CDNs providers such as AKAMAI,Microsoft,FASTLY... Are they real users or a bot trffic??
@ByteMonk
@ByteMonk Жыл бұрын
It's difficult to say for sure without looking at the specific emails you received, but it's possible that the emails are legitimate and coming from the CDN providers themselves. CDN providers typically send emails to their customers regarding updates, maintenance, and other important information related to their services. These emails can come from a variety of email addresses, and may contain links to the CDN provider's website or dashboard. However, it's also possible that the emails are part of a phishing scam or other type of fraudulent activity. To verify the legitimacy of the emails, you should check the sender's email address and any links included in the email. If you're unsure whether the emails are legitimate, you can contact the CDN provider directly through their official website or support channels to confirm the authenticity of the emails.
@jewels.t.i.8619
@jewels.t.i.8619 10 ай бұрын
Is it normal.for your asn Number to Comcast is a CDN.? Like why when I look up my Ip address is Cdn02 from my internet provider
@user-ys2sk9qc9t
@user-ys2sk9qc9t 9 ай бұрын
You didn’t explain where the CDN load balancer itself resides
@ByteMonk
@ByteMonk 8 ай бұрын
Thanks for asking that question, I should have clarified. The CDN load balancer exists at each level within the CDN hierarchy. At the top level, there's often a global load balancer (GSLB) that directs user requests to the nearest or optimal point of entry into the CDN. Once the request reaches the CDN via the GSLB, it's then directed to a regional or point of presence (PoP) load balancer. These load balancers exist at the edge locations or PoPs. They're responsible for routing the request to the most suitable edge server within that particular region or PoP. The selection is based on similar criteria as the GSLB (e.g., proximity, server load, etc.). At the lowest level, individual edge servers themselves might have load balancing mechanisms. If an edge location has multiple servers, an edge load balancer will distribute the requests among them for optimal resource utilization and to ensure no single server is overwhelmed.
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 70 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
Final muy increíble 😱
00:46
Juan De Dios Pantoja 2
Рет қаралды 48 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,9 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 70 МЛН