Load testing: simulating multiple (>100) clients?

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
naquad
OpenVpn Newbie
Posts: 2
Joined: Tue Oct 17, 2023 1:27 pm

Load testing: simulating multiple (>100) clients?

Post by naquad » Tue Oct 17, 2023 1:31 pm

Hi,

Recently I've had a need to implement a custom auth plugin for OpenVPN to integrate with our SSO. I've implemented a C plugin with deferred auth support and a pool of workers to perform the actual auth. It looks ok, and now I'm trying to simulate the load to ensure it works correctly.

I would like to have at least 200-300 simultaneous connection tries. VMs are not an option here as they consume too much RAM, I've also tried to configure the client not to add any routes/settings, but it still tries to create an interface with the same IP which causes an error.

Is there any way to perform OpenVPN load testing w/o developing a custom client that will simulate the auth?

Thank you.

andrea924breaux
OpenVpn Newbie
Posts: 1
Joined: Wed Mar 13, 2024 10:41 am

Re: Load testing: simulating multiple (>100) clients?

Post by andrea924breaux » Wed Mar 13, 2024 10:43 am

To perform load testing on your custom OpenVPN authentication plugin without developing a custom client, you can use existing tools and techniques to simulate connection attempts. Here's a general approach you can take:


Use Load Testing Tools: There are several load testing tools available that can simulate multiple concurrent connections to your OpenVPN server. Some popular options include Apache JMeter, Gatling, and Tsung. These tools allow you to create scenarios where multiple users attempt to connect simultaneously.

Configure Load Testing Tool: Set up your load testing tool to simulate the desired number of concurrent connections. Configure the tool to send authentication requests to your OpenVPN server using the same authentication method as your custom plugin. You may need to adjust the tool's settings to ensure it sends the correct requests and handles responses appropriately.

Monitor Server Performance: During the load test, monitor the performance of your OpenVPN server to ensure it can handle the increased load. Pay attention to metrics such as CPU usage, memory usage, and network throughput. This will help you identify any bottlenecks or performance issues that may arise under load.

Analyze Results: Once the load test is complete, analyze the results to determine how well your custom authentication plugin performs under load. Look for any errors, timeouts, or other issues that may indicate problems with the plugin or the server's ability to handle the load.

By using load testing tools and simulating concurrent connection attempts, you can effectively test the performance and scalability of your custom OpenVPN authentication plugin without the need for a custom client. This approach allows you to identify and address any potential issues before deploying the plugin in a production environment. www-ikrogerfeedback.com
Last edited by andrea924breaux on Thu Mar 14, 2024 4:42 am, edited 2 times in total.

naquad
OpenVpn Newbie
Posts: 2
Joined: Tue Oct 17, 2023 1:27 pm

Re: Load testing: simulating multiple (>100) clients?

Post by naquad » Wed Mar 13, 2024 10:49 am

None of those tools are relevant as they're not able to act as an OpenVPN client. In the case of OpenVPN, they can simulate only TCP connections which is not representative.

Post Reply