FTP to multiple servers using one domain without load balancing

ftpjavaload balancing

So i'm looking into how to allow users to FTP into different servers just through one domain such as ftp.mysite.com. Each of the servers will be unique in a manner of speaking, running their own processes and users etc.

I was playing with the idea of building a single machine that would be hosted on ftp.mysite.com that would then distribute those uploaded files to the correct server over a high speed lan.

Would it be viable to do this? For example I could create a java server application that would get user details from a SQL database, upload the files to temporary storage on the FTP server and instantly transfer those files off to the correct server and then clean up the temp files.

I've had other ideas such as install an ftp server on each server and get user details from the SQL server but then I believe I wouldn't be able to user a single domain for uploads.

Any comments and criticisms of my current idea welcome 🙂

Edit: Making my idea clearer.

My main plan was to have a single IP for FTP that users can connect to. This FTP server would then SSH into the correct server and pull a list of files and display it to the user in their FTP client. When an upload occurs it would then be put in a temp folder on the FTP server that is shared across a LAN with the other servers. The FTP server will then copy the uploaded files from the share on the FTP server across a high speed LAN to the correct server.

I want this to be as simple as possible for users to connect and change their files hence the use of a single IP and FTP for uploads.

Best Answer

Based on your additional info, why not simply run NFS or equivalent filesharing where the FTP server is the NFS/filesharing client ? IE make the FTP location a set of shares so that the client is actually FTP'ing directly onto the disk of the appropriate fileserver based on the directory they FTP into.

This would cut out the need for writing additional code and mean that the FTP files uploaded and downloaded are immediately available and consistent with the servers. You have not mentioned the OS you are using but doing this under Linux is pretty trivial - and there is absolutely nothing stopping an NFS disk being used as a destination for an FTP server.

Related Topic