Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Implementing a load-balancing/failover configuration

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 2 Posters 3.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      athoik
      last edited by

      After reading the OpenVPN documentation i have notice that it is possible to implement a load-balancing/failover configuration for client.

      @http://openvpn.net/howto.html#loadbalance:

      Implementing a load-balancing/failover configuration
      Client

      The OpenVPN client configuration can refer to multiple servers for load balancing and failover. For example:

      remote server1.mydomain
          remote server2.mydomain
          remote server3.mydomain

      will direct the OpenVPN client to attempt a connection with server1, server2, and server3 in that order. If an existing connection is broken, the OpenVPN client will retry the most recently connected server, and if that fails, will move on to the next server in the list. You can also direct the OpenVPN client to randomize its server list on startup, so that the client load will be probabilistically spread across the server pool.

      remote-random

      If you would also like DNS resolution failures to cause the OpenVPN client to move to the next server in the list, add the following:

      resolv-retry 60

      The 60 parameter tells the OpenVPN client to try resolving each remote DNS name for 60 seconds before moving on to the next server in the list.

      The server list can also refer to multiple OpenVPN server daemons running on the same machine, each listening for connections on a different port, for example:

      remote smp-server1.mydomain 8000
          remote smp-server1.mydomain 8001
          remote smp-server2.mydomain 8000
          remote smp-server2.mydomain 8001

      If your servers are multi-processor machines, running multiple OpenVPN daemons on each server can be advantageous from a performance standpoint.

      OpenVPN also supports the remote directive referring to a DNS name which has multiple A records in the zone configuration for the domain. In this case, the OpenVPN client will randomly choose one of the A records every time the domain is resolved.

      Although you can add entries in "Custom options" i don't believe its the appropriate method.
      Adding the remote server and port via the interface would be more friendly and easy for every user to implement.

      I hope to add some support about it in upcoming 1.2 version.

      dup!

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        The custom options are there for ppl who want to use custom functions (like a balanced server) ;).
        Using this field is the right way :)

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.