CDN and its working

CDN and its working

A content delivery network(CDN) is a network of servers spread all acroos the globe. It consists of a group of edge servers which stores the static and dynamic content of a website.


Terminalogies

  • POP(Point of presence) is the term used for all the servers spread across the globe and each POP has a server Edge Server.
  • So many CDN providers use different technologies but mainly these 2 technologies are used for searching a appropriate nearby POP. 1. DNS (Domain name server) based routing. 2. Anycast routing.


Working archietecture using DNS

working diagram for CDN

  1. A step 1 is when a user types a website (www.facebook.com) inside a browsing window. The browser looks up the domain name in the local DNS cache.
  2. Step 2 if the domain name does not exist in the local DNS cache, the browser goes to the DNS Resolver to resolve the name. This resolver can be found in an ISP (Internet Service Provider).
  3. DNS resolver recursively resolves the domain name. Finally, it asks the authoritative name server to resolve the domain name.
  4. In Step 4 If we do not use CDN, the authoritative name server returns the IP address for the website (eg:- www.facebook.com). But with CDN, the authoritative name server has an alias pointing to www.facebook.cdn.com (The domain name of the CDN server).
  5. Now the DNS resolver asks the authoritative name server to resolve the balancer of CDN www.facebook.com.
  6. The CDN authoritative name server returns the CDN load balancer domain name. eg:- www.facebook.lb.com
  7. Then the DNS resolver asks the CDN load balancer to resolve the domain name obtained from step 6 i.e. www.facebook.lb.com . Now this is the place where the IP address of the nearest edge server is returned to DNS resolver.
  8. DNS resolver obtains the IP address to be visited for CDN access to the website. and is forwarded to the requester browser window.
  9. The browser then visits the CDN edge servers to load the content. There are 2 types of content which can be present. 1. static content:- which includes static pages, Pictures, videos, Text content 2. Dynamic content:- These include results of edge computing.\
  10. If the edge CDN server cache does not contain the content, it goes upward to the regional CDN server. And similarly it moves closer to the destination CDN server until the required content is found. Similar to the bubbling of events in an HTML file.

Hope I was able to provide you with a gist of how big CDN providers work.

Thank you. Hare Krishna.

#systemdesign




要查看或添加评论,请登录

Manjeet Singh的更多文章

社区洞察

其他会员也浏览了