As far as I understand, you need to enter the original DNS records for the site, and you receive 2 cloudflare nameservers which you put in at the registrar, and cloudflare tests which nameservers are active and the corresponding DNS records get pushed to cloudflare internal DNS servers.

When someone accesses the original site, example.com, and their ISP DNS caches are refreshed, the recursive resolver will receive the cloudflare nameserver IP, which will return a CDN server IP that is closest to the IP of the ISP DNS server, and it gets returned to the user. The user then sends a request to the CDN IP for a resource on example.com; and, I assume, the CDN is configured to proxy to whatever is in the host header—in this case example.com—which gets sent to internal DNS servers, which contain the user-entered, original DNS records and resolve example.com to the IP of the example.com server. The CDN also caches static files for each domain.

Is this a correct overview?

  • That seems a more or less correct conceptual overview.
    – HBruijn
    Jun 25 '19 at 12:49

At a high level, yes. Their DNS puts their CDN in front of your infrastructure.

Implementation details add some additional tricks, like an anycast CDN nodes and possibly being aware of the client's subnet via DNS edns-client-subnet extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.