Unicon - SCG - Scaling SCG with clustered setup to overcome client limitations

book

Article ID: CTX696215

calendar_today

Updated On:

Description

Steps to configure SCG in a clustered setup

  1. Distribute load and improve fault tolerance:

    • By clustering multiple SCG instances, each instance can manage up to its defined client limit.
    • In the event of an instance failure, only the clients connected to that instance are affected, and they can reconnect to other healthy instances.
  2. Scale with additional Instances:

    • Clustering enables scalability for higher availability, load distribution, and fault tolerance.
    • You can add instances as needed, with resources like CPU, RAM, and storage adjusted to handle the increased load per instance.
  3. Configure an optimal cluster:

    • Following MongoDB guidelines for clustering, configure an odd number of instances (3, 5, 7, etc.) for balanced fault tolerance.
    • This setup ensures that in case of instance failure, other instances can handle the remaining clients without exceeding capacity.
  4. Reference documentation:

Issue/Introduction

SCG instances utilizing OpenVPN have a default limitation of 1024 clients per instance (max-clients = 1024). This limit can be adjusted, but scaling beyond it strains hardware resources (CPU, RAM, HDD, bandwidth). If an instance goes down, all connected clients lose their connection to the management server.

Solution

To increase load capacity, availability, and fault tolerance, consider deploying SCG in a clustered configuration. Clustering SCG allows multiple instances to share the client load, ensuring continuous client management and a higher total capacity.

Additional Information

Example of clustered setup

  • Each SCG instance serves its defined number of clients. If max-clients is increased, ensure that corresponding resources (CPU/RAM/HDD) support the higher load.
  • Clients reconnect to the next available instance if one fails, maintaining management continuity.

Benefits of SCG clustering

  • High Availability: Ensures consistent client management even if one instance fails.
  • Load Distribution: Balances client connections across instances, reducing the load per instance.
  • Fault Tolerance: Provides seamless connectivity for clients, allowing them to switch to available instances when needed.

Recommendations

Deploy SCG in a clustered setup to ensure optimal performance and client capacity. Following these guidelines helps prevent downtime, improve fault tolerance, and support client scalability.