[GH-ISSUE #2445] frps支持集群部署 #1944

Closed
opened 2026-05-05 13:15:05 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @dolfly on GitHub (Jun 9, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2445

The solution you want

Alternatives considered

How to implement this function

Application scenarios of this function

Originally created by @dolfly on GitHub (Jun 9, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2445 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> **The solution you want** <!--A clear and concise description of the solution you want. --> **Alternatives considered** <!--A clear and concise description of any alternative solutions or features you have considered. --> **How to implement this function** <!--Implementation steps for the solution you want. --> **Application scenarios of this function** <!--Make a clear and concise description of the application scenario of the solution you want. -->
gitea-mirror 2026-05-05 13:15:05 -06:00
Author
Owner

@qupeng110 commented on GitHub (Jun 15, 2021):

我初步的想法是如果frps做集群,则frpc需要一种类似于服务发现的机制来与所有frps建立login通信,通过DNS获取配置域名的所有IP,并依次实现login通信。

优点:
1. 集群内部所有frps都可以等价接收C端用户的访问请求
2. 集群内所有节点无状态,任意一个frps节点Down都不影响服务的可用性
3. 现🈶️的frps无需做任何调整,架构简洁,服务端可以无限扩展
4.
缺点:
1. frpc需要保持多个长链接
2. 其需要支持高并发,高性能,服务可靠性与转发能力远小于frps集群,会成为瓶颈所在

另外一个方案就是frps的集群内部做master与slave,master负责与所有frpc建立lgoin通信,slave主要负责做业务流量的代理转发。
集群内的master负责与frpc建立lgoin链接,集群接收到C端请求后通过master下发集群内的某个slave节点iP给frpc,frpc主动发起链接,之后该frps节点做代理转发。
不过我不太喜欢这个方案,这样做frps集群比较复杂且扩展性并不好

<!-- gh-comment-id:861282881 --> @qupeng110 commented on GitHub (Jun 15, 2021): 我初步的想法是如果frps做集群,则frpc需要一种类似于服务发现的机制来与所有frps建立login通信,通过DNS获取配置域名的所有IP,并依次实现login通信。 优点: 1. 集群内部所有frps都可以等价接收C端用户的访问请求 2. 集群内所有节点无状态,任意一个frps节点Down都不影响服务的可用性 3. 现🈶️的frps无需做任何调整,架构简洁,服务端可以无限扩展 4. 缺点: 1. frpc需要保持多个长链接 2. 其需要支持高并发,高性能,服务可靠性与转发能力远小于frps集群,会成为瓶颈所在 另外一个方案就是frps的集群内部做master与slave,master负责与所有frpc建立lgoin通信,slave主要负责做业务流量的代理转发。 集群内的master负责与frpc建立lgoin链接,集群接收到C端请求后通过master下发集群内的某个slave节点iP给frpc,frpc主动发起链接,之后该frps节点做代理转发。 不过我不太喜欢这个方案,这样做frps集群比较复杂且扩展性并不好
Author
Owner

@fatedier commented on GitHub (Jun 16, 2021):

集群的方案有相关的设计,但是相对复杂,而且大多数偏商业化需求,开源版本里可能不会花太多精力做这件事。

<!-- gh-comment-id:861982286 --> @fatedier commented on GitHub (Jun 16, 2021): 集群的方案有相关的设计,但是相对复杂,而且大多数偏商业化需求,开源版本里可能不会花太多精力做这件事。
Author
Owner

@github-actions[bot] commented on GitHub (Aug 1, 2021):

Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.

<!-- gh-comment-id:890423380 --> @github-actions[bot] commented on GitHub (Aug 1, 2021): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1944
No description provided.