Platform with multiple servers control #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal: create a convenient class to manage multiple VPN servers wrapped in the outline-vpn-api class, without worrying about servers that suddenly stop working and distributing users across servers. Additionally, there should be no need to administer databases (the service is completely stateless). After restarting the service, it should only gather up-to-date data on VPN servers, remove duplicate keys (keeping only the most recent one), and grant access to keys based on the username (only one key per user is available at all times).
Solution:
Two files have been added, which do not affect the core functionality but add a new capability to manage an array of servers, increasing the reliability of the system that remains operational even if any of the servers fail.
This file describes methods for updating data from servers, creating new keys (on an arbitrary or explicitly specified server), deleting keys (without explicitly searching for the server on which the key is currently located), and adding or increasing user limits.
An example of the .env file looks as follows:
SERVER_1="server1"
CERT_1="xxx"
API_1="xxx"
SERVER_2="server2"
CERT_2="xxx"
API_2="xxx"
SERVER_3="server1"
CERT_3="xxx"
API_3="xxx"