Skip to content

VPN: OpenVPN: Instances - debounce learn-address calls#9843

Merged
AdSchellevis merged 1 commit intomasterfrom
openvpn_learn-address
Feb 24, 2026
Merged

VPN: OpenVPN: Instances - debounce learn-address calls#9843
AdSchellevis merged 1 commit intomasterfrom
openvpn_learn-address

Conversation

@AdSchellevis
Copy link
Member

To help us limit the number of alias updates to a minimum.

When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one. This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen.

Although there is a small downside to this (clients connecting constantly, nobody responsible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).

There seems to be a possibility to trigger an excessive amount of calls to learn-address, but during my tests I have never seen connects from one client triggering updates for another. If this would happen, the number of calls would grow substantially.

@swhite2 @Monviech

@AdSchellevis AdSchellevis self-assigned this Feb 22, 2026
@AdSchellevis AdSchellevis added the cleanup Low impact changes label Feb 22, 2026
…e number of alias updates to a minimum.

When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one.
This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen.

Although there is a small downside to this (clients connecting constantly, nobody resposible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).
@AdSchellevis AdSchellevis merged commit 5423b72 into master Feb 24, 2026
@AdSchellevis
Copy link
Member Author

@swhite2 merged in d74dc5a, which moves the debouncer inside the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Low impact changes

Development

Successfully merging this pull request may close these issues.

3 participants