简体   繁体   English

如何在不停机的情况下使用 Apache Mina FTP 服务器进行持续部署?

[英]How to do continuous deployment with Apache Mina FTP server without downtime?

I'm trying to set up an Apache Mina FTP server in my continuously-deployed Java application.我正在尝试在我持续部署的 Java 应用程序中设置Apache Mina FTP 服务器 I'd like to be able to update and deploy it without users experiencing FTP downtime.我希望能够在没有用户遇到 FTP 停机时间的情况下更新和部署它。 I suspect this involves some sort of proxy ( ProxyConnector? ) to handle requests and delegate them between two copies of my FTP server.我怀疑这涉及某种代理( ProxyConnector? )来处理请求并将它们委托给我的 FTP 服务器的两个副本之间。 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.我无法使用 Apache 的 Mina FTP 服务器找到任何此类示例。 Is this possible?这可能吗? Where can I find examples?我在哪里可以找到示例? Thanks.谢谢。

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.您需要一个标准代理服务器,它监听两个 FTP 端口并将连接传递到两个 FTP 服务器之一,您甚至可以实现故障转移或负载平衡代理。 The simplest TCP proxy just copies what ever it gets from one socket to the other in both directions.最简单的 TCP 代理只是将它从一个套接字获得的内容在两个方向上复制到另一个。

The code is the same, regardless of what TCP server you are proxying or what software it uses.无论您代理的是什么 TCP 服务器或它使用什么软件,代码都是相同的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM