Load balancing FTP & FTPS Servers
About (FTP) File Transfer Protocol
File Transfer Protocol also known as FTP is a protocol that is used to transfer files between computers on a network. Using FTP grants users and computers the ability to exchange and transfer files between servers, desktop computers, online accounts and online software archives.
Key benefits of load balancing
Here are a few key benefits:
- Ensures the application is always available
- Provides a stable, optimal performance
- Uninterrupted uptime when performing upgrades/maintenance
How to load balance (FTP) File Transfer Protocol
FTP can be used either at command line or via FTP applications that provide a graphical user interface such as Cyberduck (for Mac) and Filezilla (for Windows).
However, in the real world FTP sites are heavily used and may require several attempts before being able to connect and exchange the necessary files. This is where introducing a load balancer can alleviate cumbersome connections by load balancing network traffic to other available FTP servers within the VIP cluster, ensuring high availability and scalability of the environment.
FTP provides two modes of operation Active and Passive mode. In active mode, the FTP server connects back to the client so client source IP transparency is a must. That’s ok though as Layer 4 has this is enabled out of the box, however, layer 7 requires Tproxy to be enabled and that comes with the caveat of needing two subnets; one for the VIP and the other for the FTP servers.
Alternatively, passive mode means that all connections are initiated by the client, the FTP server then sends the client a port to use for the inbound data connection which can be a wide range of ports and as such it is useful to limit this port range.
|Protocol||Port||Load balancing methods|
|FTP-Active||20,21||Layer 4 NAT (Recommended) Traditional NAT mode provides easy implementation fast and transparent load balancing but usually requires a two-arm configuration (two subnets).
Layer 7 SNAT, (a reverse proxy) Tproxy must be enabled for transparency and two subnets must be used.
|FTP-Passive||21,high_port||Layer 4 NAT (Recommended)|