Extremely slow connection between private IPs [SOLVED]
$ time mysql -h 192.168.130.XX -u xxxx -p
Enter password:
... (ctrl-D)
mysql> Bye
real 0m30.632s
user 0m0.004s
sys 0m0.001s
$
Substituting the server's public IP address, it connects instantly. The same thing happens with ssh, so I'm pretty sure it's not a mysql issue. In both cases, once the connection is set up, it's fast as usual.
What the hell? Any ideas? I've tried to poke around and debug this, but I'm not sure where to start. My /etc/network/interfaces on both nodes seem fine, and rebooting both of them didn't help.
Edit: plain HTTP connects instantly over the private IP, though.
5 Replies
–skip-name-resolve
Thanks to the irc crew for helping me figure it out!
Those were attempts to do lookups on two of Sprint's network blocks, 173.96.0.0/11 and 99.200.0.0/13 .
Figuring that out was quite hair-pulling. Reverse DNS on those IPs is now quick again, so things are normal. Could this be related?