Cluster

OpenHub framework supports running in the cluster. 

If you decide to implement cluster over single application you can gain the following benefits:

  • high availability (HA) - there are more nodes which can process incoming request if something goes wrong with one node
  • deployment without application shutdown from the user point of view (of course it's limited by type changes in the application and database)
  • more robust solution, risk of single point of failure will decrease


  • load balancer (LB) is infrastructure system that routes incoming calls to appropriate cluster node. Load balancer checks/asks in repeated intervals each node for information about node's state to have information to which node routes incoming message. OpenHub framework offers several built-in services/URLs which can be used - see Spring Boot Actuator
  • database (DB) is common place for saving data for all nodes in the cluster. Database has the following benefits
  • each node (application server) is independent to another node. Common application code (such as util classes, converters, connectors, DAOs, ...) can be shared in the following way:
    • separated and alone JAR file shared via filesystem on the classpath
    • separated module shared via Maven dependency management to all applications (this option is prefered)
  • cache (also called memory grid) is common fast memory for caching and sharing data between OpenHub instances in the cluster. Static or mostly read-only data can be cached and some features needs to have common data over all cluster nodes, for example throttling.
  • scheduler runs scheduled jobs which can be started in two modes
    • job can run on each node independently to each other
    • job has to run only once, no matter on which node 
  • logs are usually saved into files on the shared filesystem to have log files in one place for searching. Apart from this can be all requests and responses saved into database.


Admin GUI is running on each node in the cluster. There some functions which are common over the whole cluster (e.g. searching data from database) but there are several functions which are specific to concrete one node (e.g. stopping the node, endpoints overview).