Book Contents

Book Index

Load Balancer

Book Contents

Book Index

Introduction

Load Balancer is an element of the K2 architecture that can be used to distribute the load among multiple application servers. The K2 API thus has the ability to connect to multiple application servers simultaneously. When sending a request, the least busy server is evaluated first and it receives the request for processing.

LoadBalancer.gif

Picture: Load Balancer and K2 API

Example of using Load Balancer and K2 API:

The K2 API receives the request for processing. Load Balancer is addressed for the fastest request processing. The Load Balancer sends a request to all ASs and finds out their current load. It evaluates the least busy server and passes this information to the K2 API. The K2 API thus sends the request directly via the selected application server to the Load Balancer.

LoadBalancer can also be used for web K2, which when the user logs on, finds the most suitable application server and connects the user to it.

LoadBalancer1.gif

Picture: Load Balancer and Web K2

Example of using Load Balancer and Web K2:

Web K2 accepts the user's login request. The web K2 Load Balancer will contact the request to process the request as quickly as possible. The Load Balancer sends a request to all AS and finds out their current load. Web K2 passes the information on the least busy server. Web K2 will use the best evaluated server and thus the fastest processing of the user's login request will take place. Every other request of a given user is already processed by a specific selected AS.

Each K2 API and K2 web installation has its own Load Balancer. In the installation, you can set a specific list of application servers and the configuration of the Load Balancer, which can affect the algorithm for selecting a suitable application server.

Load Balancer evaluates the most suitable application server for request processing in two modes:

  1. Loading and evaluating the best AS before each connection request (preLoadingEnabled = false)
    • Before each request to create a connection, the application servers are bypassed with a request for their statistics, which are processed and evaluated. The most appropriate AS is then used for the given request.
  2. Load and evaluate the best AS continuously (preLoadingEnabled = true)
    • Statistics are read in the specified time interval and the best AS is evaluated. Each connection request is evaluated based on the calculated result of the statistics.

Book Contents

Book Index

Load Balancer parameters

If in any mode the Load Balancer does not connect with the AS in the required time interval, or the AS does not supply statistics in the specified time, it is excluded from the evaluation for the given AS pass. In the next pass, the Load Balancer will try to connect to the AS again.

Book Contents

Book Index