High Availability for Endpoints

Configuring Load Balancing Endpoints

When using WSO2 API Manager, you can configure load balancing endpoints via the API Publisher.

  1. When you create an API, to configure load balancing endpoints go to the edit view of the API, click Endpoint to view the Endpoint page.

  2. Expand Load balance and Failover Configurations.

    load balance and fail over

  3. Select Load Balanced as the endpoint type.

    load-balanced

  4. Configure the endpoint.

    load-balanced

    The following are the other configurations that you need to define in order to specify a load balancing endpoint.

    Production Endpoints

    Specify the set of production endpoints here where the requests need to be load balanced. If required, you can specify more than one endpoint by clicking +, and can delete the endpoints by clicking on the bin icon.

    Sandbox endpoints

    The set of sandbox endpoints can be specified here where the requests need to be load balanced. If required, you can specify more than one endpoint by clicking +, and can delete the endpoints by clicking on the bin icon.

    Algorithm

    The load balancing algorithm is specified here.

    Click on the cogwheel icon to define the algorithm.

    The default value is the Round-Robin Algorithm, which has the org.apache.synapse.endpoints.algorithms.RoundRobin className. If you select another algorithm, you need to specify the class name of the algorithm. Class names of other algorithms can be found here.

    Session Management

    Click on the cogwheel icon to configure session management.

    This refers to a session management method from the load balancing group. The possible values are as follows:

    • None - If this is selected, session management is not used.

    • Transport - If this is selected, session management is done on the transport level using HTTP cookies.

    • SOAP - If this is selected, session management is done using SOAP sessions.

    • Client ID - If this is selected, session management is done using an ID sent by the client.

    Session Timeout The number of milliseconds after which the session would time out.

    Click on the cogwheel icon to set up session timeout

  5. Click SAVE.

Configuring Failover Group of Endpoints

When using WSO2 API Manager, you can configure failover group endpoints via the API Publisher.

  1. When you create an API, to configure failover endpoints go to the edit view of the API, click Endpoint to view the Endpoint page.

  2. Expand Load balance and Failover Configurations.

    failover

  3. Select Failover as the endpoint type.

  4. Configure the endpoint.

    failover

    You need to add at least one failover endpoint as the production and sandbox (based on the endpoints that you have specified) endpoints.

    If required, you can specify more than one endpoint by clicking +, and can delete the endpoints by clicking on the bin icon.

  5. Click SAVE.

Top