New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
TCP load balancing/failover
Here is what I'm trying.
I want to setup multiple servers in front of a single dedicated server. Setting up those multiple servers isn't a problem. However I need to make sure that people can use the service with 1 A record.
Lets say example.com points to 1.2.3.4, the server 1.2.3.4 point to a dedicated server. Lets say 11.22.33.44. Now I add another front end server with the ip 5.6.7.8. This means that 1.2.3.4 and 5.6.7.8 both redirect to the dedicated 11.22.33.44. Now I need to make sure that whenever 1.2.3.4 isn't available users get redirect to 5.6.7.8.
I'm not sure if it is possible, I don't like to change DNS everytime.
Comments
Anycast
edit: stupid me, you'd probably still need to announce BGP routes so it's not that much better.
we have built-in failover support
I know, I'm trying to setup a small service here and not all the users want or can switch to Rage4.
Too bad tough.
I have a script in beta that switches A record IPs via cloudflare API when it detects that the main server is down. You could try something like this.
lol I didn't even see that post when I was typing my response. Must've been a ClusterError™.
This is very good, we have had success with it:
http://www.zenloadbalancer.org/web/
Easy setup too, takes a few minutes.
It sounds like you need a DNS that supports Round robin
zonomi.com supports this, you can add multiple IP's on 1 A record, if one IP goes down users will get redirected to a IP that is still Alive.
I think this sums up your needs:
https://vpsboard.com/topic/3341-running-your-own-failover-dns-setup/#entry49939
And I'm saying it again, I can't use DNS.
This.
Edit: After reading what you want some more you need a script that runs on 11.22.33.44 that pings the front end servers and automatically changes your DNS for you if they go down.
I think you are simply looking for nginx! load balancer reverse proxy!!
I wasn't talking about webhosting here.
i kind of misread the last part!
As the discovery of your domain name is done by the dns part that you don't want to change only a failover ip setup would do that!
but if you go the dns part with something like powerdns and mysql backend
you could with a script switch back and forward witch is not ideal even with a low TTL.
Or another alternative is a cheap vps with nginx as loadbalancer with backend checks in front of the two servers witch is what i would go for depending weather or not i can get a fail-over ip!
Is this for web traffic or something else?
Something else.
What about HAProxy and point to each of your servers?
You'd still need IP anycast given that he only wants one public IP and all the fun that entails (eg HostVirtual does it). Basically the only other solution is a dynamic/failover IP within a DC. All nodes would have to be contained in that one DC. A couple places like OVH, AWS, Linode come to mind as supporting that type of deployment.
LVS (http://www.linuxvirtualserver.org/) - we've been using the direct routing architecture in our shared hosting cluster since the late 90s. With the LVS-Tun setup you should be able to use geographically disparate locations. Rock solid stuff.