4 ms·
HTTP redirects would introduce a delay and quite a bit of additional traffic. However, application level choice of server embedded in the output HTML would be e
by bensummers 17y ago
HTTP redirects would introduce a delay and quite a bit of additional traffic. However, application level choice of server embedded in the output HTML would be efficient, and more accurate because it knows the precise IP address of the client, not merely the DNS server it's using.
But this requires much more than just changing a URL, it requires logic on the CDN customer's servers and some form of replication of the database mapping IP address to server.
So you're right, DNS is not the right place for a CDN. But it works. It's just like web browsers are completely the wrong universal client for server based applications, but web applications work.
Pragmatism sometimes trumps correctness.