A content-delivery network (CDN) is a geographically distributed network of proxy servers. It sits between clients and a web server, helping deliver content with higher availability and better performance. Its intermediate cache can reduce latency and the bandwidth used by the origin server. section 8.1 section 3.1.4
The architecture diagram places a CDN and a reverse proxy between clients and the board-game API. The API still handles requests and data exchange, while the added layers can cache responses before requests reach it. section 3.1.4
For a production API, choosing a CDN means choosing an intermediate layer instead of binding the public domain directly to the web server’s IP address. Requests reach the CDN first and are then forwarded to the origin server. Depending on the provider and plan, the CDN may also mask the origin IP address, filter malicious requests with a web application firewall, and mitigate DDoS attacks. These benefits come with extra configuration and architectural complexity. section 12.1.3
Decide what the CDN should cache before relying on it:
- For a mostly static site, consider browser or CDN HTTP caching for HTML, CSS, JavaScript, and images. section 8.1
- For a RESTful API, consider HTTP response caching for frequently accessed GET endpoints or default-parameter requests. When clients request varied, specific data, server-side caching may do more to relieve the database. section 8.1
Board-game API deployment
The board-game website is hosted on a CDN, while a separate CDN layer is proposed in front of its API. For the API deployment, the goal is to serve content without directly exposing the hosting server and to support a secure edge-origin arrangement with encryption between the server and users’ browsers. Provider setup is a practical deployment task, not an API code change. section 1.1.2 section 3.1.4 section 12.5
A CDN is not equally useful for every protocol: gRPC responses are difficult to cache through intermediaries such as CDNs. Check the API’s request patterns and caching needs before treating an added layer as an automatic performance improvement. section 10.3.2 section 8.1



