0

I wanted to setup something like this:
ftp.example.com
which points to different ftp servers. For example:

111.111.111.1
111.111.111.2
111.111.111.3
111.111.111.4

When someone connects to ftp.example.com, he would be randomly connected to one of those servers. I was thinking of some DNS based solution, but is there something better ?

Joel Coel
  • 12,910
  • 13
  • 61
  • 99
micheal
  • 9
  • 1

2 Answers2

9

You're looking for a standard DNS Round Robin setup. You just add multiple A records to your DNS server.

There are limitations (see linked document), and to avoid those, you would need an FTP aware proxy or FTP aware load balancer product to sit in front of your FTP servers.

EightBitTony
  • 9,211
  • 1
  • 32
  • 46
3

There are several FOSS software load balancers available for such use cases. The difference between DNS RR load balancing and tcp load balancers are connection termination. You'd advertise one (or multiple) A record that points to one or more load balancers (LBs). The LBs can then send traffic back to a number of backend ftp servers. The benefit here is greater control of how the load is distributed to the backend FTP servers. Similarly, if you need to take a FTP server down, tcp load balancing makes the process much easier. With DNS RR, you'd have to ensure you delete the backend FTP server and wait for DNS caches to update before you take down an FTP server or risk users hitting the down IP.

bangdang
  • 486
  • 2
  • 6