0

I'm trying to set up an Apache Mina FTP server in my continuously-deployed Java application. I'd like to be able to update and deploy it without users experiencing FTP downtime. I suspect this involves some sort of proxy (ProxyConnector?) to handle requests and delegate them between two copies of my FTP server. When a change is made, one copy should be updated and restarted before the other in order to maintain uptime.

I haven't been able to find any examples of this with Apache's Mina FTP server. Is this possible? Where can I find examples? Thanks.

Mike Cialowicz
  • 9,892
  • 9
  • 47
  • 76

1 Answers1

0

You need a standard proxy server which listens to the two FTP ports and passes the connection to one of two FTP servers, you could even implement fail over or load balancing the proxy. The simplest TCP proxy just copies what ever it gets from one socket to the other in both directions.

The code is the same, regardless of what TCP server you are proxying or what software it uses.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
  • Seems like there aren't many FTP proxy options. Apache Mina doesn't support uploading of files (only GET): http://httpd.apache.org/docs/2.2/mod/mod_proxy_ftp.html. "Currently, only GET is supported for FTP in mod_proxy. You can of course use HTTP upload (POST or PUT) through an Apache proxy." A hardware solution might work, and we're investigating that now. – Mike Cialowicz Jun 13 '11 at 15:41
  • Or you could just listen on a couple of ports and connect and forward data as I suggested, its just a couple threads and one loop to copy data back/forth. Perhaps the solution so simple, you are missing it. ;) – Peter Lawrey Jun 13 '11 at 16:16