Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So, as the UI is a regular webappHTML app, there may be several options to balance both the UI webapp and the API. A couple of examples are given below.

...

In this setup, we are spreading the load amongst a cluster of nodes running both API and UI. Please note that any API clustered setup REQUIRES using zookeeper to work.
For the sake of simplicity, we are using a two node setup, but this is easily scalable to several nodes and using Apache web server as a load balancer.

 

 CHANGE THIS

Assume the following IP addressing for our cluster nodes.

NodeIP addressingPort / Protocol
Apache LB10.60.13.10Tomcat 80 or 443
ZooKeeper node10.60.13.102181
API node1192.168.2.1008010
UI node1192.168.2.10080
Tomcat API node2192.168.2.1018010

Installation

...

UI node2192.168.2.10180

Installation

Start by installing backend severs using the Server profile of the Abiquo ISO installer. This profile will install API and UI webapps, as well as the zookeeper daemon needed for API to work in a clustered configuration.

...

Once you have both servers with the Server profile installed, keep in mind that you need to keep abiquo.properties file synchronized on every node in the API cluster.

API consensus

First, for the API to function as a clustered API, you need to setup zookeeper. The zookeeper package is installed using the "Server" profile of the Abiquo installer ISO. If it is not installed, you can do so typing:

...

Code Block
abiquo.server.api.location = httphttps://10abiquoui.60example.13.10com/api

You will need to edit file /opt/abiquo/tomcat/conf/Catalina/localhost/api.xml and set the values for the MySQL kinton database:

...

You need to change the urlusername and password attributes to match your environment.

UI configuration

In a clustered UI setup, you will need to configure the LB as API endpoint for each UI node. Edit /var/www/html/ui/config/client-config.json file and set same config.endpoint property for each node. For example:

Code Block
"config.endpoint": "https://abiquoui.example.com/api",

*** In this setup, maybe it would be nice that by default each UI users the API hosted in the same node and in case of API failure, balance petitions to other nodes. This should be configurable at LB level I guess. *** 

Tomcat configuration

First of all, we will configure a couple of Tomcats to listen to regular HTTP and AJP connections. To do that, edit the conf/server.xml file inside the tomcat directory and edit the following values:

Code Block
<Connector port="8009" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
 
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
 
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node1">

Make sure the jvmRoute parameter is different in each host as this will be used by Apache tomcat to route requests to each host.

...