Overview

The main responsibility of process managers is executing commands on microservices through its management interfaces including the examination of proper environmental condition of each command execution (ex. the amount needed resources). In case of application microservices execution is performed through TRANSMISSION port by PROCESS MANAGER, in case of technical microserivces implementation of command execution depends on the API provided by technical microserice and is performed by TECHNICAL PROCESS MANAGER.

Process manager

The process manager takes care of application microservices, it monitors their availability on the OS level, detects JVM error and takes action in order to restore microservice availability.

Technical process manager

The technical process manager takes care of technical microservices, it monitors their availability on the OS level, responsiveness and takes action in order to restore microservice availability. Its implementation differs depending on the type of technical microservice.

Configuration

Configuration of process managers is a part of main config and consists of the following sections:

Section 'PROCESS_MANAGER'

The default configuration:

PROCESS_MANAGER:
  isCheckAvailableOSMemoryOnMicroservicesStart: true
  startupOrder: 1
  MICROSERVICES_PORT_OFFSET:
    NATIVE:
      begin: 20001
      end: 30000
    SERVLET:
      begin: 30001
      end: 40000
  OS_PROCESSES_KEEPER:
    isCheckOSProcessAlive: true
    howOftenCheckingProcessInMillis: 5000
    #logPath: 'c:/server/alternative_path/process_errors'
  JVM_MEMORY_ERRORS_KEEPER:
    isCheckMemoryErrors: true
    howOftenCheckingProcessInMillis: 5000
    #heapDumpPath: c:/server/restart_log/heap_dump
    #logPath: 'c:/server/alternative_path/memory_errors'
    #archiveLogPath: 'c:/server/alternative_path/memory_errors_archive
    #restartLogPath: c:/server/restart_log/
Parameter Description
isCheckAvailableOSMemoryOnMicroservicesStart The switch that determines whether there is enough memory for the starting microservice. If the process manager finds that there is not enaugh memory for a new microservice, it won't start.
startupOrder The startup order index that determines the order between process manager and technical process manager. The higher value means higher priority in terms startup procedure. By default process manager has higher priority then technical process manager.

Subsection 'MICROSERVICES_PORT_OFFSET'

Main Server needs port sets to establish communication to microservices. These sets are managed automatically by default which means that ports in each set is assigned dynamically. Port sets are defined individually for each application microservice type (NATIVE and SERVLET), each port set starts with begin port and ends with end port.

Subsection 'OS_PROCESSES_KEEPER'

The OS process keeper checks the existence of the microservice's process in the operating system (it knows the PID of the microservice). If it finds that the process doesn't exists and this state doesn't result from administrative tasks (ex. microservice stop) it automatically starts the microservice.

Parameter Description
isCheckOSProcessAlive The switch that determines whether OS process keeper is active.
howOftenCheckingProcessInMillis The checking period of OS process keeper, expressed in milliseconds.
logPath Location of log files from start, stop and restart process. The default value is: $JLUPIN_HOME/server/logs/process_manager

Subsection 'JVM_MEMORY_ERRORS_KEEPER'

Memory process keeper is a process of controlling the occurrence of errors related to the JVM memory. It periodically checks if any error occurs, if it does the recovery actions are taken to restore the microservice availability, which are described in servlet microservice configuration and native microservice configuration.

Parameter Description
isCheckMemoryErrors The switch that determines whether memory process keeper is active.
howOftenCheckingProcessInMillis The checking period of memory process keeper, expressed in milliseconds.
heapDumpPath The location of the heap dump collected from the microservice during memory error handling. After the dump is finished, it is moved to the archive location. The default value is: $JLUPIN_HOME/server/logs/memory_manager/errors
logPath The log file that contains the error stack trace which describes the class where memory error occurs. The default value is: $JLUPIN_HOME/server/logs/memory_manager/restart
archiveLogPath The archive of data collected during memory errors handling (dumps, logs).
restartLogPath The location of log files collected from the restart process of the microservice during memory errors handling. After the process of memory handling is finished the log file is moved to archive location.

Section 'TECHNICAL_PROCESS_MANAGER'

Technical OS process manager is responsible for availability of technical microservices, it periodically checks their processes, if they are not present or unresponsive the proper action are taken to roster the availability of technical microservice.

The default configuration:

TECHNICAL_PROCESS_MANAGER:
  isCheckOSProcessAlive: true
  howOftenCheckingProcessInMillis: 5000
  responseOSTimeToCheckProcessAliveInMillis: 2000
  startupOrder: 2
  restartDelayInMillis: 10000
Parameter Description
isCheckOSProcessAlive The switch that determines whether technical OS process keeper is active.
howOftenCheckingProcessInMillis The checking period of technical OS process keeper, expressed in milliseconds.
responseOSTimeToCheckProcessAliveInMillis The maximum response time of the technical process, beyond which the mechanism recognizes that the process is unavailable and performs its restart.
startupOrder The startup order index that determines the order between process manager and technical process manager. The higher value means higher priority in terms startup procedure. By default process manager has higher priority then technical process manager.
restartDelayInMillis The delay expressed in milliseconds that technical process manager waits after it discovers that the technical microservice is missing in OS and before it tries to start it again.