NodeBalancer vs swap IP

The scenario I'm trying to accomplish is having 2 linodes, both will be exact images. A primary and a backup. I have custom applications with custom protocols (nothing with http) with persistent connections. If linode #1 dies, I want to be able to login and move all traffic to linode #2. Clients connect using a domain name which points to one of the public IPs.

Can this be done by using the Swap IP function to just change the IPs of both linodes? Can the linodes be in different data centers or do they have to be in the same one?

Or

Is this something I'd need a node balancer to pull off? Can I run a node balancer to linodes in multiple data centers? I'm never going to be sending traffic to both linodes, I need only to switch everything from one to the other.

When I switch traffic using either method, how much time does it take for change to take effect?

2 Replies

Yes, you can do this by swapping IPs. If there is state maintained on Linode #1 (e.g., changes to a database), you will have to devise a way to keep Linode #2 synchronized during ordinary circumstances.

If Linode #1 has a problem, you can swap IPs and carry on with #2. It is not possible to swap IPs between systems in different datacenters. I don't immediately see a way to do the swap via the API, so it looks like a manual process.

Another option you may want to look into is IP failover.

@nickadv:

Can this be done by using the Swap IP function to just change the IPs of both linodes? Can the linodes be in different data centers or do they have to be in the same one?

Yes, can be done with swap IP. Linodes must be in the SAME datacenter.

@nickadv:

When I switch traffic using either method, how much time does it take for change to take effect?

IINM, Swap IP's requires a reboot.

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