Network Helper sped up private networking, w/o private IP or VLAN?
Hi friends! I have a question about something that seems to maybe be working better than I would have expected from the documentation, and I'd like to run it by y'all to make sure I'm understanding correctly.
I have a web server and database server both running in the same Linode account and region. The web server connects to the database server via its hostname, db.example.com
. Unsurprisingly, this used public networking, which often resulted in unnecessarily slow queries, by sending the traffic outside Linode's datacenter then back in (I think?).
So, I decided to configure the two servers to run in a private VLAN, to speed up the connection. I started by enabling Network Helper on the web server (it was previously disabled), and rebooted the server, because I understood Network Helper to be a prerequisite for setting up private VLAN on Linode.
I was surprised to find that enabling Network Helper seemed to speed up my query times dramatically, despite not yet setting up private VLAN, private IPv4, or making any changes I would have expected to matter.
I'm surprised because, on the web server, db.example.com
still resolves to the public IP address; so I would have expected this to still use the public network, and for the traffic to still exit Linode's datacenter then come back in.
I notice that the Network Helper added a Gateway=XX.XX.XX.X
line to my /etc/systemd/network/05-eth0.network
config file, on Ubuntu 20.04 LTS. (I've redacted the address because I don't know if it's private information.)
Does using this gateway change how my traffic is routed, such that the networking algorithm notices that the public address can be resolved faster through the internal network? That would make sense to me as a networking amateur, but it's not mentioned in the documentation, and I don't know enough about network gateways to know if a gateway config line would have that kind of effect.
Anyway, I don't have a problem, exactly? It seems like things are faster now and my problem is solved? I'm just noticing that the solution is behaving differently than I expected, so I want to check and make sure I'm not missing something important!