[GH-ISSUE #1482] How to use load balancing? #1169

Closed
opened 2026-05-05 12:45:06 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @keyoti on GitHub (Oct 29, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1482

I would like to contribute documentation for the load balancing, but before I do, I need to understand it myself :)

It seems like Load Balancing is implemented so that one FRPS server balances load between multiple FRPC clients in a group. In other words, more than one machine connects to the FRPS server, each machine has the same website, and then the incoming web requests are distributed evenly to the client machines. Is that correct?

I was hoping that load balancing was different, what I wanted was the opposite; multiple servers running FRPS and only one FRPS client to each. So, that the FRPS is load balanced, not FRPC. I need to do that because there will be lots of FRPC connections. Do you have any idea how to do this? Would it work with a HTTP load balancer like AWS Application Load Balancer?
I think not because there needs to be a route from the HTTP request to the correct server running with the connection to the intended FRPC client. I don't expect you to answer that unless you have some experience or thoughts, thanks!

Originally created by @keyoti on GitHub (Oct 29, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1482 I would like to contribute documentation for the load balancing, but before I do, I need to understand it myself :) It seems like Load Balancing is implemented so that one FRPS server balances load between multiple FRPC clients in a group. In other words, more than one machine connects to the FRPS server, each machine has the same website, and then the incoming web requests are distributed evenly to the client machines. Is that correct? I was hoping that load balancing was different, what I wanted was the opposite; multiple servers running FRPS and only one FRPS client to each. So, that the FRPS is load balanced, not FRPC. I need to do that because there will be lots of FRPC connections. Do you have any idea how to do this? Would it work with a HTTP load balancer like AWS Application Load Balancer? I think not because there needs to be a route from the HTTP request to the correct server running with the connection to the intended FRPC client. I don't expect you to answer that unless you have some experience or thoughts, thanks!
Author
Owner

@fatedier commented on GitHub (Oct 29, 2019):

A simple way to implement FRPS load balancing is that one FRPC(or multiple FRPC in one machine with different server_addr) connects to multiple FRPS.

So you can deploy an HTTP load balancer in front of FRPS.

Another way: divide FRPCs by domain, *.cluster1.xxx.com, *.cluster2.xxx.com, *.cluster3.xxx.com ...
One FRPS is reponsible for specified domains. HTTP load balancer route requests to different FRPS by host.

<!-- gh-comment-id:547310329 --> @fatedier commented on GitHub (Oct 29, 2019): A simple way to implement FRPS load balancing is that one FRPC(or multiple FRPC in one machine with different server_addr) connects to multiple FRPS. So you can deploy an HTTP load balancer in front of FRPS. Another way: divide FRPCs by domain, *.cluster1.xxx.com, *.cluster2.xxx.com, *.cluster3.xxx.com ... One FRPS is reponsible for specified domains. HTTP load balancer route requests to different FRPS by host.
Author
Owner

@yashodhank commented on GitHub (May 15, 2022):

I recently found project called Keepalived basically it provides loadbalancing and high-availability with server pool according their health can efficiently help us in such cases.
I am yet to test this hypothesis out..

<!-- gh-comment-id:1126866735 --> @yashodhank commented on GitHub (May 15, 2022): I recently found project called [Keepalived](https://github.com/acassen/keepalived) basically it provides loadbalancing and high-availability with server pool according their health can efficiently help us in such cases. I am yet to test this hypothesis out..
Author
Owner

@Nour963 commented on GitHub (Nov 5, 2022):

I recently found project called Keepalived basically it provides loadbalancing and high-availability with server pool according their health can efficiently help us in such cases. I am yet to test this hypothesis out..

Any news of that ?

<!-- gh-comment-id:1304601154 --> @Nour963 commented on GitHub (Nov 5, 2022): > I recently found project called [Keepalived](https://github.com/acassen/keepalived) basically it provides loadbalancing and high-availability with server pool according their health can efficiently help us in such cases. I am yet to test this hypothesis out.. Any news of that ?
Author
Owner

@HenAmar commented on GitHub (Sep 28, 2023):

@fatedier I don't see an option today to connect single frpc to multipile servers. is that supported ?

<!-- gh-comment-id:1739813911 --> @HenAmar commented on GitHub (Sep 28, 2023): @fatedier I don't see an option today to connect single frpc to multipile servers. is that supported ?
Author
Owner

@yashodhank commented on GitHub (Nov 3, 2023):

it is not supported out of box but one can use floating IP, keepalived and loadbalancer to make fault tolerant FRPS.
Apart from how to install FRPS, all other steps documented here:
https://community.hetzner.com/tutorials/howto-highly-available-load-balancer-hetzner-cloud-ansible

<!-- gh-comment-id:1791910660 --> @yashodhank commented on GitHub (Nov 3, 2023): it is not supported out of box but one can use floating IP, keepalived and loadbalancer to make fault tolerant FRPS. Apart from how to install FRPS, all other steps documented here: https://community.hetzner.com/tutorials/howto-highly-available-load-balancer-hetzner-cloud-ansible
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#1169
No description provided.