# Datareel Load Balancer 1.57 configuration file # # Default LB config file # Global config [LBSERVER] port = 8080 # All incoming traffic connections here # # Set to accept clients on single interface ##listen_ip_addr = 0.0.0.0 # # LB_ASSIGNED scheme requires a rules config file # A default rules config file will be build if specified file does not exist ##scheme = LB_ASSIGNED ##rules_config_file = drlb_server_rules.cfg ##resolve_assigned_hostnames = 1 ##assigned_default = LB_RR # Use round robin for node fail over ##assigned_default = LB_DISTRIB # Use distib for node fail over ##assigned_default = LB_WEIGHTED # Use weighted for node fail over # Set assigned_default to LB_NONE to disable node fail over, meaning: # If the assigned node is not available the client connection will fail ##assigned_default = LB_NONE # ##scheme = LB_DISTRIB ##scheme = LB_WEIGHTED # Use Round Robin as default LB scheme scheme = LB_RR use_buffer_cache = 1 buffer_size = 1500 max_connections = -1 # Not set, if set will limit number of connections this server max_threads = -1 # Not set, if set will limit number of threads for this process # # Log settings # Keep log file plus last 3. Disk space will be: (max_log_size * (num_logs_to_keep +1)) num_logs_to_keep = 3 # Set max size per log file, max is 2000000000 max_log_size = 5000000 # Default is 5M, max is 2G log_queue_size = 2048 # Max number of log or console messages to queue log_queue_debug_size = 4096 # Max number of debug messages to queue log_queue_proc_size = 255 # Max number of process messages to queue # Values below can be set here or args when program is launched ##clear_log = 0 ##enable_logging = 0 # Log levels 0-5, 0 lowest log level, 5 highest log level ##log_level = 0 ##logfile_name = /var/log/drlb/drlb_server.log # # Stats settings # Keep stats file plus last 3. Disk space will be: (max_stats_size * (num_stats_to_keep +1)) num_stats_to_keep = 3 # Set max size per stats file, max is 2000000000 max_stats_size = 5000000 # Default is 5M, max is 2G stats_min = 5 # Generate a stats report every 5 minutes stats_secs = 0 # If min=0 gen a stats report less than every min ##enable_stats = 0 ##stats_file_name = /var/log/drlb/drlb_stats.log # # Set max number of back logged connections # Should match: cat /proc/sys/net/core/somaxconn somaxconn = 128 # # Buffer overflow detection with using cached reads, disabled by default enable_buffer_overflow_detection = 0 buffer_overflow_size = 6400000 # # Retries for backend node connection errors retries = 3 retry_wait = 1 # # Use timeout on blocking reads use_timeout = 0 timeout_secs = 300 timeout_usecs = 0 # # Service name that appears in log file ##service_name = drlb_server # # Idle time for blocking sockets max_idle_count = 60000 idle_wait_secs = 0 idle_wait_usecs = 500 # Use non-blocking sockets use_nonblock_sockets = 0 # # # Settings for throttling connections # Throttling is used to prevent backend server saturation during peak load events # # Enable throttling ##enable_throttling = 0 # Apply throttle control only when load reached a certain number of connection per second # If apply by load is set to 0, we will throttle based on the connection count ##throttle_apply_by_load = 0 # Set the number of connection per second to start throttling connections ##throttle_connections_per_sec = 10 # Set the number of connections to start throttling # A setting of 1 will throttle every connection ##throttle_every_connections = 10 # Set the time in seconds or microseconds to hold a connection in the throttle queue ##throttle_wait_secs = 1 ##throttle_wait_usecs = 0 # # HTTP IP address forwarding ##enable_http_forwarding = 0 ##http_request_strings = DELETE,GET,HEAD,PATCH,POST,PUT ##http_hdr_str = HTTP/ ##http_forward_for_str = X-Forwarded-For # # Values below can be set here or args when program is launched # Debug and verbose modes used mainly for development and testing # NOTE: Debug level 5 will greatly increase log file size # NOTE: Verbose mode will echo messages to the console, used mainly to test config files ##debug = 0 ##debug_level = 1 ##verbose = 0 ##verbose_level = 1 # Node Configs, define a [LBNODE] section for each node # The default config uses 4 nodes as an example # Replace 192.168.122 address with the IP address or hostname of the backend node # running the service you wan to load balance. [LBNODE] node_name = lbnode1 port_number = 80 # Port backend host is listening on hostname = 192.168.122.111 # Backend host weight = -1 # Must be set if using LB_WEIGHTED or LB_DISTRIB scheme max_connections = -1 # Not set, if set will limit number of connection to this node buffer_size = -1 # Use global size [LBNODE] node_name = lbnode2 port_number = 80 hostname = 192.168.122.112 weight = -1 # Must be set if using LB_WEIGHTED or LB_DISTRIB scheme max_connections = -1 # Not set, if set will limit number of connection to this node buffer_size = -1 # Use global size [LBNODE] node_name = lbnode3 port_number = 80 hostname = 192.168.122.113 weight = -1 # Must be set if using LB_WEIGHTED or LB_DISTRIB scheme max_connections = -1 # Not set, if set will limit number of connection to this node buffer_size = -1 # Use global size [LBNODE] node_name = lbnode4 port_number = 80 hostname = 192.168.122.114 weight = -1 # Must be set if using LB_WEIGHTED or LB_DISTRIB scheme max_connections = -1 # Not set, if set will limit number of connection to this node buffer_size = -1 # Use global size # End of configuration file