Private IPs and Bandwidth and MySQL server

Just curious about a couple questions:

1. Is the free bandwidth between Linodes strictly if both Linodes are in the same datacenter AND they are connected by private IP, or can they just be in the same DC without private IPs?

2. When I add the private IPs in my network file for each Linode, do I need to now connect to my MySQL VPS from the other Linodes via the private IP or the server IP? I guess what I am trying to say is once I add the private IP per linode into its network file, do I also need to change the PHP files at my other linodes ( which connect to my MySQL linode ) so that my mysql connection uses the private IP too? Right now it just uses the server IP.

Thanks for clarification.

2 Replies

@eliquid:

Just curious about a couple questions:

1. Is the free bandwidth between Linodes strictly if both Linodes are in the same datacenter AND they are connected by private IP, or can they just be in the same DC without private IPs?
Yes, free bandwidth is only intra-DC, and if you're connecting over IPv4 you must use the private addresses. For IPv6 there's no public/private address separation - any intra-DC traffic over IPv6 counts as private traffic.

> 2. When I add the private IPs in my network file for each Linode, do I need to now connect to my MySQL VPS from the other Linodes via the private IP or the server IP? I guess what I am trying to say is once I add the private IP per linode into its network file, do I also need to change the PHP files at my other linodes ( which connect to my MySQL linode ) so that my mysql connection uses the private IP too? Right now it just uses the server IP.
Yes. One thing you could also consider doing is configuring private names for your intra-host communication, setting the relevant addresses in your local /etc/hosts file. That way, should you need to change, you only need to adjust the private address information in one place rather than in each application/client that may be using it. Plus, it's nicer for those occasions you may need it interactively, like perhaps with mysql command line operations.

– David

Thanks for the advice David, it was extremely helpful to know this before coding things up!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct