<div dir="ltr">My guess is the *.<a href="http://l.google.com">l.google.com</a> runs on a separate geo-ip aware backend DNS cluster rather than *.<a href="http://google.com">google.com</a>, even though the authoritative public dns records are ns[1-4].<a href="http://google.com">google.com</a><div><br></div><div><div>C:\>dig <a href="http://www.gmail.com">www.gmail.com</a> @<a href="http://ns1.google.com">ns1.google.com</a></div><div><br></div><div>;; QUESTION SECTION:<br></div><div>;<a href="http://www.gmail.com">www.gmail.com</a>.                 IN      A</div><div><br></div><div>;; ANSWER SECTION:</div><div><a href="http://www.gmail.com">www.gmail.com</a>.          86400   IN      CNAME   <a href="http://mail.google.com">mail.google.com</a>.</div><div><a href="http://mail.google.com">mail.google.com</a>.        <span style="background-color:rgb(255,255,0)">604800</span>  IN      CNAME   <a href="http://googlemail.l.google.com">googlemail.l.google.com</a>.</div><div><a href="http://googlemail.l.google.com">googlemail.l.google.com</a>. 300    IN      A       172.217.1.101</div><div><br></div><div><br></div></div><div><br></div><div>The TTL for the <a href="http://mail.google.com">mail.google.com</a> record CNAME is 604800 seconds, which is 7 days, as opposed to the <a href="http://googlemail.l.google.com">googlemail.l.google.com</a> A record which expires in 300 seconds, allowing Google to quickly take servers in and out of rotation as required.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 4, 2016 at 4:48 AM, Anurag Bhatia <span dir="ltr"><<a href="mailto:me@anuragbhatia.com" target="_blank">me@anuragbhatia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">googlemail.l.google.com</a>. to nearest datacenter but when prevents them from doing same with <a href="http://mail.google.com" target="_blank">mail.google.com</a> instead? </div><div><br></div><div>They return Geographically closer A record for <a href="http://googlemail.l.google.com" target="_blank">googlemail.l.google.com</a>. but why not for <a href="http://mail.google.com" target="_blank">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"><div><div class="h5"><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>Anurag Bhatia <<a href="mailto:me@anuragbhatia.com" target="_blank">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></div></div><span class="HOEnZb"><font color="#888888">-- <br><div 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>
</font></span></div>
</blockquote></div><br></div>