How do CDN edge locations serve you based on proximity?

When a browser makes a DNS request for a site that is served by a CDN, the server handling the DNS request looks at the request to determine the best server to handle the request. It does a geographical lookup based on the IP of the client and responds with a server that is closest to the client.
Companies can optimize this selection by considering various factors such as server load, price, region restriction, quality of content, packet loss, etc. So after considering these factors, the DNS server of the CDN refers to the edge location closest to the user, and that's how the request is served from the closest edge location.





