Configuration

Configuration files

Internal configuration

JLupin Edge Balancer internal configuration consists of the following files:

  • NGINX configuration file nginx.conf located in $JLUPIN_HOME/platform/technical/nginx/<os_type>/conf which only includes edge.conf - the main JLupin Edge Balancer user's configuration file.
  • Virtual servers definition: data, admin and discovery located in $JLUPIN_HOME/platform/technical/nginx/<os_type>/conf/servers
  • Services definitions that are individually included by virtual server and are located in $JLUPIN_HOME/platform/technical/nginx/<os_type>/conf/services.

The list of available service is as follows:

  • common - basic parameters that are common for all types of virtual servers.
  • proxy - dynamic proxy for HTTP request to microserivces with healthchecking included.
  • discovery - discovery services that is used for intra-zone routing
  • ssl - SSL support, it can be applied to any virtual server except discovery one (that provides /_discovery URI).
  • status - information about node, microserivces and edge balancer itself.
  • debug - specific set of entry points that shows the internal state of balancer, if you know the internal architecture of JLupin Edge Balancer it could be useful in troubleshooting (before going in to debug mode).
  • addons - additional services that could be useful in development and/or maintenance (for example: swaggerUI).

Each virtual server type includes specific list of services:

data

  • common
  • proxy

admin

  • common
  • proxy
  • ssl
  • debug
  • discovery
  • status
  • addons

discovery

  • common
  • discovery

NOTE: These files SHOULD NOT be edited by the user unless JLupin support allows it (for example, while providing appropriate fix for the bug). If some of the parameters provided by above files should be changed, it should be overwritten in user's configuration.

User's configuration

The main JLupin Edge Balancer user's configuration file is called edge.conf and is located in $JLUPIN_HOME/platform/start/configuration. It contains:

  • Basic configuration of NGINX server (generic parameters)
  • JLupin LUA module configuration and initialization commands
  • 'Admin' and 'discovery' virtual servers.

It also refers to $JLUPIN_HOME/platform/start/configuration/edge_servers directory, where definitions of 'data' virtual servers are located. This is the place, where you can add / modify configuration of access points for your services provided by microservices.

Parameters

Common parameters

Name Description
error_log Generic NGiNX parameter which configures logging (offical documentation). You can change the log path (default is: $JLUPIN_HOME/server/logs/technical/nginx), but remember to ensure its availability before Edge Balancer starting. You can also change the log severity to debug but only in case of troubleshooting (it shouldn't be set to 'debug' on production during normal system operation)
worker_processes Generic NGiNX parameter that configures the number of processes (workers) that handle requests (offical documentation). The default value (2) is suitable for most use cases. You can change to higher value in case of heavy network load, where number of JLupin nodes are limited.
worker_connections Generic NGiNX parameter that configures the maximum number of simultaneous connections that can be opened by a worker process. (offical documentation). The default value (1024) is suitable for most use cases. You can change to higher value in case of heavy network load, where number of JLupin nodes are limited. Remember that the number of open file in the operating system should be increased accordingly.
proxy_connect_timeout Generic NGiNX parameter that defines a timeout for establishing a connection with a proxied server - a servlet microservice on JLupin (offical documentation). You can set custom values suitable for specific virtual servers of servlet microservices inside the server directive.
proxy_send_timeout Generic NGiNX parameter that sets a timeout for transmitting a request to the proxied server - a servlet microservice on JLupin (offical documentation).You can set custom values suitable for specific virtual servers of servlet microservices inside the server directive.
proxy_read_timeout Generic NGiNX parameter that defines a timeout for reading a response from the proxied server - a servlet microservice on JLupin (offical documentation).You can set custom values suitable for specific virtual servers of servlet microservices inside the server directive.
log_format Generic NGiNX parameter that specifies log format (offical documentation). Adjust it to your preferences.
discoveryHost JLupin LUA module parameter that defines the IP address of Main Server that is integrated with the given Edge Balancer and discovery process establishes the connection. In the default deployment pattern Edge Balancer and Main Server are located on the same OS that why the default value is 127.0.0.1.
discoveryPort JLupin LUA module parameter that defines the port number of Main Server's HTTP INFORMATION PORT that is integrated with the given Edge Balancer and discovery process establishes the connection. In the default deployment pattern there are one Edge Balancer and one Main Server per OS that why the default value is 9098.
discoveryConnectionTimeout JLupin LUA module parameter that defines a timeout for establishing a connection with Main Server HTTP INFORMATION PORT.
discoverySendTimeout JLupin LUA module parameter that sets a timeout for transmitting a request to Main Server HTTP INFORMATION PORT.
discoveryReadTimeout JLupin LUA module parameter that defines a timeout for reading a response from Main Server HTTP INFORMATION PORT.
discoveryPeriod JLupin LUA module parameter that defines how often Edge Balancer performs the discovery process of the node and running microservices. CAUTION Changes in this file should be consulted with JLupin's support.
nginxDiscoveryPeriod* JLupin LUA module parameter that defines how often Edge Balancer performs the discovery process NGINX configuration and checks its health (master). CAUTION Changes in this file should be consulted with JLupin's support.
discoveryAdminContext JLupin LUA module parameter that defines the context name of JLupin Local Web Console. CAUTION Changes in this file should be consulted with JLupin's support.
discoveryDefaultExternalPort JLupin LUA module parameter that sets the default port for those serlvet microserivces which externalPort parameter is set to ''. See the next chapters to get to know more.
discoveryPeersSource JLupin LUA module parameter that determines how JLupin Edge Balancer discovers other node in the scope of services that are provided. Definitely you should leave this parameter set as 'auto' to avoid manual reconfiguration where additional nodes are created in the autoscalling process.
discoveryPeers JLupin LUA module parameter that is the list of peers for discover process, applicable if 'discoveryPeersSource' = 'manual'.
discoveryPeersDefaultAdminPort JLupin LUA module parameter that defines the default discovery port, applicable if 'discoveryPeersSource' = 'auto'.
discoveryPeersDefaultProtocol JLupin LUA module parameter that defines the default discovery protocol, applicable if 'discoveryPeersSource' = 'auto'.
balancerSwitchPeriod JLupin LUA module parameter that defines the switching time of the balancer. We strongly advice to change it carefully along with out consulting.
balancerCookieOptions JLupin LUA module parameter that defines the default additional parameters for the cookie used when 'httpStickySession' = 'true' is set for the microservice. It's used when 'httpStickySessionCookieOptions' microservice parameter is set to null***.
healthcheckSwitch** JLupin LUA module parameter that determines if external service healthchecking is performed. If healthcheckSwitch is set to '1' the 'isExternalHealthcheck' microservice parameter is considered in the next step***.
healthcheckPeriod** JLupin LUA module parameter that defines how often Edge Balancer performs the service healthchecking process. CAUTION Changes in this file should be consulted with JLupin's support.
healthcheckDefaultURI** JLupin LUA module parameter that defines the default healthcheck URI that is used in service healthchecking process. It's used when 'externalHealthcheckURI' microservice parameter is set to null***.
healthcheckOKlimit** JLupin LUA module parameter that defines the number of successful healthcheck requests (following one after the other) after witch the AVAIABLE state of the microservice is set.
healthcheckFAILEDlimit** JLupin LUA module parameter that defines the number of unsuccessful healthcheck requests (following one after the other) after witch the UNAVAIABLE state of the microservice is set.
healthcheckConnectionTimeout** JLupin LUA module parameter that defines a timeout for establishing a connection in the service healthchecking process.
healthcheckSendTimeout** JLupin LUA module parameter that sets a timeout for transmitting a request to the microservice in the process of service healthchecking.
healthcheckReadTimeout** JLupin LUA module parameter that defines a timeout for reading a response from he microservice in the process of service healthchecking.

* since JLEB 1.5.0.2

** since JLEB 1.5.0.3

*** since JLEB 1.5.0.4

Virtual servers parameters

Each virtual server that provides services from servlet microserivces is defined through server directive and configured by the following parameters

Name Description
listen Generic NGiNX parameter that sets the port (optionally - the IP address also) on which the server will accept requests (offical documentation)
server_name Generic NGiNX parameter that sets names of a virtual server (offical documentation)
server_type JLupin LUA module parameter that defines the type od the virtual server. The virtual server types are described in the overview section
include servers/.conf The server config file that should correspond with server_type paramter.

The additional generic NGINX parameters can be provided by the user to adjust Edge Balancer actions to services' specifics (offical documentation).