Design and Create a CDN Service

Gao

Simple CDN Design

I wanna create a simple cdn server to serve my static files.

Design the cdn server.

Goals

  • Upload files
  • Service static
  • Cheep to use

Architecture

flowchart TD A[Jonathan] B[Frontend Cache Server] C[Reverse Proxy] D[Upload Server] Z[Storage Backend] A-->C C-->B B-->Z A-->C C-->D D-->Z

Choose Solutions

1. Reverse Proxy

Now using Caddy server.

Caddy can automate create https and setup proxy very easy.

TODO: Save Caddy certificates to s3.

2. Frontend Cache Server

In my knowledgement base, varnish is the best software.

3. Upload Server

I have to write it myself. So it easily fit my servers.

4. Storage Backend

The AWS Simple Storage Service (s3) is the cheapest way as I known.