Jump to content

OpenVPN Load Balancing

Mornincupofhate

So basically, I would like to have multiple servers for loads of bandwidth, but just one IP/Server for different clients to connect to.

 

Is it possible to link a bunch of servers onto one virtual network and distribute the load with OpenVPN?

Link to comment
Share on other sites

Link to post
Share on other sites

I don't personally use OpenVPN but assuming your trying to host all of them under one network, A: You would need to use different ports for each or it wouldn't work, and B: Wouldn't you just have the same problem since the virtual network would just share the resources evenly?

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Inrix said:

I don't personally use OpenVPN but assuming your trying to host all of them under one network, A: You would need to use different ports for each or it wouldn't work, and B: Wouldn't you just have the same problem since the virtual network would just share the resources evenly?

A. Yes, the dedicated servers would have their own separate ports. 

B. Not getting what you're saying here. My main goal is to, for example, combine two servers with 150mbps ports, getting 300mbps overall bandwidth on the one VPN connection.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Mornincupofhate said:

A. Yes, the dedicated servers would have their own separate ports. 

B. Not getting what you're saying here. My main goal is to, for example, combine two servers with 150mbps ports, getting 300mbps overall bandwidth on the one VPN connection.

Oh so you would virtually limit the local "virtual" adapters for each port? Therefor Limiting the bandwidth?

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Inrix said:

Oh so you would virtually limit the local "virtual" adapters for each port? Therefor Limiting the bandwidth?

Not wanting to limit anything, if anything, I'm trying to suck up all the resources that I can.

 

Let's say I buy two dedicated servers from OVH. They give me 500mbps for each server. Let's say I setup OpenVPN on both servers, and bridge them, would I be able to use ONLY the IP address of one server, but still have 1Gbps overall bandwidth?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Mornincupofhate said:

Not wanting to limit anything, if anything, I'm trying to suck up all the resources that I can.

 

Let's say I buy two dedicated servers from OVH. They give me 500mbps for each server. Let's say I setup OpenVPN on both servers, and bridge them, would I be able to use ONLY the IP address of one server, but still have 1Gbps overall bandwidth?

Ooh you want to merge the connections of two servers to gain additional speed... Firstly It really depends on where you where talking about bridging the connections... Are you talking about running Two Dedicated Machines, each with their own OpenVPN server and then trying to host that under one ip with it seen as one vpn connection? Or are you talking about doing the same thing, but connecting two vpn clients to each different server on your end and then bridging the connection locally?

 

Im assuming you where talking about briding the connection on the actual servers, and I dont think that you could do that in the way you where talking... What you would want to acheive is somehow bridge the connections together and then host only one OpenVPN server... Can you tell me any more info about the servers and how they are connected together? I assume your paying for hosting? Why not just pay for a single server with a faster connection?

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Inrix said:

Im assuming you where talking about briding the connection on the actual servers, and I dont think that you could do that in the way you where talking... What you would want to acheive is somehow bridge the connections together and then host only one OpenVPN server... Can you tell me any more info about the servers and how they are connected together? I assume your paying for hosting? Why not just pay for a single server with a faster connection?

The servers are all in one datacenter, and are connected with a 1Gbps virtual LAN in which is the speed that they communicate with other machines inside the datacenter.

 

The ones I'm looking for have a max 100Mbps port speed per server, and I really don't wan to spend $140 a month on 500Mbps port machines with hardware that I don't need.

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Mornincupofhate said:

The servers are all in one datacenter, and are connected with a 1Gbps virtual LAN in which is the speed that they communicate with other machines inside the datacenter.

 

The ones I'm looking for have a max 100Mbps port speed per server, and I really don't wan to spend $140 a month on 500Mbps port machines with hardware that I don't need.

Ok, there might be a way to do it if you somehow figured out how to get the vm's to share their connection. As for hosting two OpenVPN servers under the same IP, does each vm have a different external ip? Because the only (and easiest) way I could see you doing something like hosting OpenVPN servers and bridging the connection would be clientside by connecting to each vm through the vpn separately and then bridging those connections...

 

But as for what you want to do, you would probably need to get one of the vm's to be able to share the other vm's internet speed... But then you would have a multitude of problems if the vm's shared different external ip's ect... Since I really dont think you could bridge the two vpn servers together.

 

Not to mention you could run into a multitude of problems if your using the vpn for accessing stuff like files if the files are stored on one machine... What are you intending to use the vpns for anyway? 

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Inrix said:

Ok, there might be a way to do it if you somehow figured out how to get the vm's to share their connection. As for hosting two OpenVPN servers under the same IP, does each vm have a different external ip? Because the only (and easiest) way I could see you doing something like hosting OpenVPN servers and bridging the connection would be clientside by connecting to each vm through the vpn separately and then bridging those connections...

 

But as for what you want to do, you would probably need to get one of the vm's to be able to share the other vm's internet speed... But then you would have a multitude of problems if the vm's shared different external ip's ect... Since I really dont think you could bridge the two vpn servers together.

 

Not to mention you could run into a multitude of problems if your using the vpn for accessing stuff like files if the files are stored on one machine... What are you intending to use the vpns for anyway? 

Yes, each server will have it's own external IP address.

 

As for now, the VPNs are just going to be for DDoS mitigation, and I'm just trying to get familiar with the application itself.

 

https://docs.openvpn.net/how-to-tutorialsguides/administration/active-active-high-availability-setup-for-openvpn-access-server/

 

I've been reading on this article and it seems a bit interesting, although I'm not sure if it will do what I'm intending it to do. If combining bandwidth is too hard, I atleast just want to know if I can automatically hop users onto server 2 if the resources on server 1 are getting too little.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Mornincupofhate said:

Yes, each server will have it's own external IP address.

 

As for now, the VPNs are just going to be for DDoS mitigation, and I'm just trying to get familiar with the application itself.

 

https://docs.openvpn.net/how-to-tutorialsguides/administration/active-active-high-availability-setup-for-openvpn-access-server/

 

I've been reading on this article and it seems a bit interesting, although I'm not sure if it will do what I'm intending it to do. If combining bandwidth is too hard, I atleast just want to know if I can automatically hop users onto server 2 if the resources on server 1 are getting too little.

Wait, so you want to automatically move clients onto the other server if the first is under heavy load or combine the network speed? The doc your reading wouldnt move users over to the 2nd if the first is under load when their allready connected, only ones that are attempting to join while server 1 is under load... When you said the vpn's are going to be used for DDoS mitigation what from specifically? Are you talking about if one of the servers get DDoSed you want it to move all clients over to the other server?

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Inrix said:

Wait, so you want to automatically move clients onto the other server if the first is under heavy load or combine the network speed? The doc your reading wouldnt move users over to the 2nd if the first is under load when their allready connected, only ones that are attempting to join while server 1 is under load... When you said the vpn's are going to be used for DDoS mitigation what from specifically? Are you talking about if one of the servers get DDoSed you want it to move all clients over to the other server?

As I said above, each server is going to have a max bandwidth of 100mbps, and you probably know what happens when too many people are on one server at the same time. 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Mornincupofhate said:

As I said above, each server is going to have a max bandwidth of 100mbps, and you probably know what happens when too many people are on one server at the same time. 

Well if you setup https://docs.openvpn.net/how-to-tutorialsguides/administration/active-active-high-availability-setup-for-openvpn-access-server/ for each server, then it should allow you to have it auto assign clients based on the load of each server... But as for actively moving clients between servers while their connected, I don't think that's possible... If your just trying to balance clients between the vpn's the above doc seems to have an easy way to do it. It would also probably allow you to have it auto assign clients 50/50 to each server so that each server has roughly the same amount of clients, and assuming that every client was doing the same thing, the same load.

 

--EDIT Read my Reply To this Post

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Inrix said:

Well if you setup https://docs.openvpn.net/how-to-tutorialsguides/administration/active-active-high-availability-setup-for-openvpn-access-server/ for each server, then it should allow you to have it auto assign clients based on the load of each server... But as for actively moving clients between servers while their connected, I don't think that's possible... If your just trying to balance clients between the vpn's the above doc seems to have an easy way to do it. It would also probably allow you to have it auto assign clients 50/50 to each server so that each server has roughly the same amount of clients, and assuming that every client was doing the same thing, the same load.

 

--EDIT Read my Reply To this Topic

Sorry I misread the above doc... OpenVPN dosnt have built in load balancing, it just allows you to assign clients based on a percentage to each server, or redirect clients to another server if the first one is down.. You can read more here: https://docs.openvpn.net/how-to-tutorialsguides/administration/set-up-basic-server-load-balancingredundancy/

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Inrix said:

Sorry I misread the above doc... OpenVPN dosnt have built in load balancing, it just allows you to assign clients based on a percentage to each server, or redirect clients to another server if the first one is down.. You can read more here: https://docs.openvpn.net/how-to-tutorialsguides/administration/set-up-basic-server-load-balancingredundancy/

Is there a different VPN software that works with what I'm wanting to do?

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Mornincupofhate said:

Is there a different VPN software that works with what I'm wanting to do?

Probably, though I don't know of many apart from OpenVPN, Your best bet would be to google free VPN Server software's and find one that has the features that you need.

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×