How do I create high(er) availability using multiple regions? (HA Proxy?)

I currently have a load balancer and main linode in a single region (as required for that setup). The load balancer is not being used to balance traffic as the traffic my application receives is minimal. Instead, it is simply used to divert traffic to an "under maintenance" linode if I need to take the main linode down for some type of maintenance activity.

My region seems to continue to be hit with problems. This weekend it ended up being down for a couple of hours and although it's not the end of the world, it's certainly not ideal for me and my customers that rely on access to my site.

I would like to create some type of high availability setup where I could have mirrored servers in multiple regions, and if one region is down, divert traffic to the other region. The diverting of traffic doesn't need to be automatic. It would be nice if it was, but if I have to flip a switch manually that's perfectly fine.

I found this article on using HA Proxy to create a setup that I am perhaps thinking of: https://www.linode.com/docs/guides/how-to-use-haproxy-for-load-balancing/

However it seems as though this is primarily for load balancing, and not high availability purposes. My assumption based on reading this article is there is a single linode with HA Proxy installed, that diverts traffic between nodes. Am I correct in also assuming that if that linode with HA Proxy has an issue in its region, then it's all worthless as that linode would be down?

Is there some other type of setup I should be looking into that would give more redundancy to the main node that my customers hit (presumably the one with HA Proxy installed)?

Thank you!

1 Reply

As I understand it, we use a form of AnyCast on a nameserver-level for the resolution of FQDN >> IP addresses. We currently don't offer a DC-to-DC solution for HA/Loadbalancing, but you may be able to leverage our AnyCasting with some creativity.

If you were to deploy clones of your application to select DCs to act similar to HAProxy's Backend Nodes, and create an A Record for each server using the same domain name, it should act as a low-tech regional load balancer. Theoretically, all IP addresses would be cached globally but as you attempt to resolve the FQDN, long-latency/farther away servers would timeout and you would be served by your closest app server. This is addressed in this older Community post and since the time of that comment, we have released DNS-level AnyCast.

In this setup, you would still likely want to keep your Production > Staging arrangement setup behind a NodeBalancer whose IP is added to this DNS setup. Alternatively, you may want to consider setting up Failover between Linodes in the same DC since your goal seems to be more focused on availability rather than balancing X number of people using your app. If you include public IPs from Linodes in multiple DCs, you may be able to get keepalived to work if you use eth0 public IPs in place of the guide's eth1 private address specifications.

Ultimately, what you have described could also be performed (potentially more smoothly) by a CDN which caches your content throughout a network of servers to ensure regional deliverability. Akamai has an enterprise-level CDN Service that may be outside of your use-case/scale, so you may want to consider using CloudFlare's CDN/DDoS protection which includes a "free-tier" package.

I think that a CDN will likely be your best bet, but YMMV and I'd be interested to hear if the DNS or Failover between DCs works as intended.

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