<div dir="ltr">Hi Shane<div><br></div><div><br></div><div><br></div><div>Sure, they route <a href="http://googlemail.l.google.com">googlemail.l.google.com</a>. to nearest datacenter but when prevents them from doing same with <a href="http://mail.google.com">mail.google.com</a> instead? </div><div><br></div><div>They return Geographically closer A record for <a href="http://googlemail.l.google.com">googlemail.l.google.com</a>. but why not for <a href="http://mail.google.com">mail.google.com</a> itself? </div><div><br></div><div><br></div><div><br></div><div><br></div><div>Thanks. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 4, 2016 at 10:31 AM, Shane Kerr <span dir="ltr"><<a href="mailto:shane@time-travellers.org" target="_blank">shane@time-travellers.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Anurag,<br>
<br>
At 2016-06-04 02:52:46 +0530<br>
<span class="">Anurag Bhatia <<a href="mailto:me@anuragbhatia.com">me@anuragbhatia.com</a>> wrote:<br>
<br>
> Someone asked me question on why google uses cname for their services<br>
> anyways? I mean I get it that for Google Apps customers it makes sense to<br>
> have <a href="http://mail.domain.com" rel="noreferrer" target="_blank">mail.domain.com</a> pointed to a cname rather then A record to a host<br>
> which may die.<br>
><br>
> But why for their own services? Like e.g "<a href="http://mail.google.com" rel="noreferrer" target="_blank">mail.google.com</a>" is cname to<br>
> <a href="http://googlemail.l.google.com" rel="noreferrer" target="_blank">googlemail.l.google.com</a>. and <a href="http://googlemail.l.google.com" rel="noreferrer" target="_blank">googlemail.l.google.com</a>. eventually returns A<br>
> record. This adds up one extra step in resolution and I wonder why Google<br>
> does it this way? What advantage they get ? or What advantage they miss if<br>
> they simply return record which I am getting for <a href="http://googlemail.l.google.com" rel="noreferrer" target="_blank">googlemail.l.google.com</a>.<br>
> directly as A record for <a href="http://mail.google.com" rel="noreferrer" target="_blank">mail.google.com</a> ?<br>
<br>
</span>I guess that this is a CDN trick, to give different answers based on<br>
the resolver's originating IP address (or client-subnet EDNS0<br>
information, if available).<br>
<br>
In Beijing I get this:<br>
<br>
$ host <a href="http://mail.google.com" rel="noreferrer" target="_blank">mail.google.com</a><br>
<a href="http://mail.google.com" rel="noreferrer" target="_blank">mail.google.com</a> is an alias for <a href="http://googlemail.l.google.com" rel="noreferrer" target="_blank">googlemail.l.google.com</a>.<br>
<a href="http://googlemail.l.google.com" rel="noreferrer" target="_blank">googlemail.l.google.com</a> is an alias for <a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a>.<br>
<a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a> has address 74.125.203.19<br>
<a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a> has address 74.125.203.18<br>
<a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a> has address 74.125.203.17<br>
<a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a> has address 74.125.203.83<br>
<a href="http://mail-china.l.google.com" rel="noreferrer" target="_blank">mail-china.l.google.com</a> has IPv6 address 2404:6800:4005:802::2005<br>
<br>
The CNAME chain can send users to servers closer to where they are, and<br>
allows operators to redirect traffic to less-busy servers or even take<br>
sites offline easily.<br>
<br>
Cheers,<br>
<br>
--<br>
Shane<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif"><br></font></div><div><br></div><font face="arial, helvetica, sans-serif">Anurag Bhatia<br></font><div></div><div><font face="arial, helvetica, sans-serif"><a href="http://anuragbhatia.com" target="_blank">anuragbhatia.com</a></font></div></div></div></div></div></div>
</div>