How CDN Works | System Design

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • 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:
    ► • System Design Intervie...
    AWS Certification:
    ►AWS Certified Cloud Practioner: • How to Pass AWS Certif...
    ►AWS Certified Solution Architect Associate: • How to Pass AWS Certif...
    ►AWS Certified Solution Architect Professional: • How to Pass AWS Certif...

ความคิดเห็น • 37

  • @user-zk1zm6sm2u
    @user-zk1zm6sm2u 18 ชั่วโมงที่ผ่านมา +1

    Well demonstrated the functionality of the CDN

  • @abhishekguitarist
    @abhishekguitarist 4 หลายเดือนก่อน +2

    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 ปีที่แล้ว +12

    This channel deserves more attention, absolutely awesome wealth of system design knowledge 🙌

    • @ByteMonk
      @ByteMonk  ปีที่แล้ว +2

      I appreciate the words of encouragement; comments like yours provide the necessary fuel to keep me going.

    • @ritwik121
      @ritwik121 ปีที่แล้ว +2

      True

  • @stephan24297
    @stephan24297 ปีที่แล้ว +1

    very informative and easy to understand. also a good pace 👏thanks for the upload

  • @quiccloud
    @quiccloud 5 หลายเดือนก่อน +1

    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  5 หลายเดือนก่อน

      thank you for the appreciation ❤ Yes, my goal has been to provide just "enough details" :)

  • @vinayakpatil5214
    @vinayakpatil5214 11 หลายเดือนก่อน +1

    other videos actually cant explain backend working of cdn, but this made my doubts clear! thank u

    • @ByteMonk
      @ByteMonk  10 หลายเดือนก่อน

      Glad to hear that!

  • @hashcoeur
    @hashcoeur 11 หลายเดือนก่อน +1

    Very nice bro. Thanks for this amazing content

  • @Bavtomar
    @Bavtomar หลายเดือนก่อน +1

    very helpful thanks

  • @amitsri
    @amitsri 2 หลายเดือนก่อน +1

    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 ❤️

  • @meditationdanny701
    @meditationdanny701 ปีที่แล้ว +1

    Awsome 🎉

  • @denizyakut7633
    @denizyakut7633 5 หลายเดือนก่อน

    Hİ,firstly thank you for clear explanation. Could you please share a documant about this explanation ?

  • @filipniklas
    @filipniklas 11 หลายเดือนก่อน +1

    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 หลายเดือนก่อน +3

      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 หลายเดือนก่อน +1

      @@ByteMonk Cheers mate, appreciate the thorough response!

  • @apostoloskou
    @apostoloskou ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      Thanks you sir for taking me one step ahead to cdn work flow...

    • @ByteMonk
      @ByteMonk  ปีที่แล้ว +1

      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  ปีที่แล้ว +2

      @@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 หลายเดือนก่อน +1

    You didn’t explain where the CDN load balancer itself resides

    • @ByteMonk
      @ByteMonk  9 หลายเดือนก่อน

      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.