frp icon indicating copy to clipboard operation
frp copied to clipboard

[Feature Request] frps clustering

Open adyanth opened this issue 7 months ago • 3 comments

Describe the feature request

I would like to deploy multiple frps servers at different locations, have the frpc connect to the nearest ones, but allow the users connect to connect to whichever frps is near to them but still reach the frpc.

To say differently, allow frps to talk to each other and route traffic between them to reach the client.

User -> frps A -> frps B -> frpc

This would also prevent a single point of failure by having multiple frps instances, and the clients should be able to connect to an active one in case the preferred one goes down.

Describe alternatives you've considered

I think something ad hoc might be done by running an frpc where the frps B is running in the above example, but not sure if it would work

User -> frps A -> (frpc, frpsB) -> frpc

Affected area

  • [ ] Docs
  • [ ] Installation
  • [x] Performance and Scalability
  • [ ] Security
  • [ ] User Experience
  • [ ] Test and Release
  • [ ] Developer Infrastructure
  • [ ] Client Plugin
  • [ ] Server Plugin
  • [ ] Extensions
  • [ ] Others

adyanth avatar May 20 '25 04:05 adyanth

This is a relatively complex feature, and there are no plans for it at the moment. Different types of protocols and proxies may require special handling.

fatedier avatar May 20 '25 06:05 fatedier

I agree. Issue could be up for tracking in the future, or if you don't think it is feasible to be implemented in frp, feel free to close!

adyanth avatar May 20 '25 06:05 adyanth

up for discussion, plan 1, this is actually a CDN that given each frps an unique IP or domain. client can actually switch between them. plan 2, given this convention as auto reconnection mechanism, all frpcs to route from the nearby peer for stable traffic, looks like the middle layer is the actualy CDN that allow the visited frps to choose from different nodes.

jjhesk avatar Jun 27 '25 06:06 jjhesk