What's Point of Having the Web Server Talk to the CDN - The Client Should Directly Talk to CDN

In the section “The newsfeed generation service”, there is a diagram for the newsfeed architecture. What’s the point of having the web server talk to the CDN? IMHO, the client should directly talk to the CDN to speed up the content delivery by taking advantage of near location.

Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Design of a Newsfeed System - Grokking Modern System Design Interview for Engineers & Managers

1 Like

Hi Peter Lee,

I agree with your observation that the user should be able to communicate directly with the CDN. On the other side, it is also useful and recommended to connect a CDN with the web server in the design of a newsfeed system. The web server can generate the newsfeed pages dynamically, but the static assets like images, CSS, JavaScript files, and other resources associated with the newsfeed can be offloaded to the CDN. By configuring the CDN to cache these static resources, subsequent requests for the same content can be served directly from the CDN’s edge servers, reducing the load on the web server and improving overall response times.

Considering your feedback, we have taken the necessary steps to incorporate your suggested point and make appropriate changes to the lesson.

Thank you for your feedback.

1 Like