# Multi-node

Exivity can be deployed on a single node, or on multiple nodes for HA and load balancing. This guide walks you through the steps to install some of the Exivity components on different nodes.

## Multi-Node System Architecture

The following diagram outlines the various components that can be deployed on separate nodes:

![](/files/-Me5_Tdo6Sx9z7XIIts_)

For larger environments, it is recommended to deploy each component on separate virtual machine nodes. As displayed in the  diagram above, a typical multi-node deployment will consist of the following elements:

* **Load Balancer** *(optional)*
  * An optional but recommended 3rd party load balancer may be used to ensure high availability of the Exivity front end web application.
* **Exivity Web/UI node(s)**
  * 1 or more Exivity Web/UI nodes should be deployed to support the customer facing web application.
* **Exivity API/Backend node(s)**
  * 1 or more Exivity API/Backend nodes should be deployed to support the customer facing web application.
  * ***Storage***
    * In multi-node environments, it is advisable to provide a shared storage device (i.e. SMB/NFS) that can be accessed by the backend nodes
* **PostgreSQL node or cluster**
  * Exivity solution relies on a PostgreSQL version 10 (or higher) compliant database engine.
* **RabbitMQ node or cluster**
  * Exivity relies on a RabbitMQ version 3.8 (or higher) message broker

The platform is designed in such a way that adding and removing Exivity nodes should be relatively straightforward, which compliments thr potential growth or shrinkage of data processing needs.&#x20;

### Deploying a PostgreSQL node

Exivity highly recommends deploying your own PostgreSQL database cluster on Linux (or use a managed PSQL service from [Azure](https://azure.microsoft.com/en-us/services/postgresql), [AWS ](https://aws.amazon.com/rds/postgresql/)or other vendors). To achieve High Availability, any PostgreSQL compatible cluster manager software may be used. At Exivity we have good experiences with [**pg\_auto\_failover**](https://cloudblogs.microsoft.com/opensource/2019/05/06/introducing-pg_auto_failover-postgresql-open-source-extension-automated-failover-high-availability/), which is an [open source](https://github.com/citusdata/pg_auto_failover) PostgreSQL on Linux cluster manager (backed by Microsoft) in case you prefer to self-manage the Exivity PostgreSQL database.&#x20;

{% hint style="warning" %}
When using a PostgreSQL database on a remote host, the database and user must have been created beforehand. To create the database, ask your database administator to execute a database create statement similar to the one below:

**CREATE DATABASE exdb** \
&#x20; **WITH** \
&#x20; **OWNER = exadmin** \
&#x20; **TEMPLATE = template0** \
&#x20; **ENCODING = 'UTF8'** \
&#x20; **LC\_COLLATE = 'en\_US.UTF-8'** \
&#x20; **LC\_CTYPE = 'en\_US.UTF-8'** \
&#x20; **CONNECTION LIMIT = -1;**&#x20;

In addtion, make sure to set the following minimal (or higher) PostgreSQL configuration parameters:

**`shared_buffers = 2GB`**

**`work_mem = 32MB`**&#x20;

**`wal_buffers = 64MB`**&#x20;

**`max_prepared_transactions = 16`**
{% endhint %}

In case you prefer to install PostgreSQL on Windows, Exivity recommends installingthe PostgreSQL role together with the API/Scheduler backend components during the installation wizard.

### Deploying a RabbitMQ node

Exivity highly recommends deploying your own [RabbitMQ ](https://www.rabbitmq.com/download.html)instance on Linux (or use a managed RabbitMQ service from [AWS](https://aws.amazon.com/about-aws/whats-new/2020/11/announcing-amazon-mq-rabbitmq/), [CloudAMQP](https://www.cloudamqp.com/), or other vendors).&#x20;

### Deploying a Backend node

In order to deploy a backend node, the following steps need to be executed manually or automatically thru the use of the silent installer CLI interface.

After starting the installer, click *Next* and provide a valid license key when asked. After clicking *Next* again, the component screen will be shown:

![](/files/-Mji_wgJAf8xpsj7J43o)

Ensure to deselect the *Web Service* . The *API Service* component can also be excluded, although in some cases it is recommended to have the API and Backend Services running on the same system. Please consult with Exivity [support ](mailto:support@exivity.com)in case you are not certain what to select.

Click *Next* to continue. Then provide a folder for the Exivity program files, and afterward select a folder for the Exivity home files.

Provide a custom administrator username and password, or leave the default:

![](/files/-M32EdZUBjy-dYPuMAB2)

Now specify a remote PostgreSQL database instance, or select to install the PostgreSQL database locally on the API/backend node:

![](/files/-M32TGunVUu9esmG5xrg)

{% hint style="warning" %}
When using a PostgreSQL database on a remote host, the database and user must have been created beforehand. To create the database, ask your database administator to execute a database create statement similar to the one below:

**CREATE DATABASE exdb** \
&#x20; **WITH** \
&#x20; **OWNER = exadmin** \
&#x20; **TEMPLATE = template0** \
&#x20; **ENCODING = 'UTF8'** \
&#x20; **LC\_COLLATE = 'en\_US.UTF-8'** \
&#x20; **LC\_CTYPE = 'en\_US.UTF-8'** \
&#x20; **CONNECTION LIMIT = -1;**&#x20;
{% endhint %}

When you are finished configuring your PostgreSQL database settings, click the *Next* button to configure *RabbitMQ*. To use a remote *RabbitMQ* instance, deselect the '*Install Local RabbitMQ Engine'* and provide the appropriate hostname, username, password, vhost and TCP port. In case you require TLS/SSL towards your RabbitMQ instance, select that checkbox as well:

![](/files/-MjiaHm_4krVWB_zYU6v)

Once the installation is finished, ensure to check *'Start the Exivity Windows Services'* to start the Exivity services after clicking *Finish.*

![](/files/-M32GbN4geBx9DmVM2Z_)

{% hint style="info" %}
In order to achieve High Availability for the Exivity API/backend node, it is advisable to leverage the HA capabilities of your hypervisor (i.e. vSphere HA). In case you want to achieve OS level HA, you may consider implementing a Windows Failover Cluster. Please reach out to <support@exivity.com> / [support.exivity.com](http://support.exivity.com) to learn more about this kind of configuration.
{% endhint %}

#### Silently install Backend node

The below example will silently install an Exivity API/Backend node while using a remote PostgreSQL database instance as well as a remote RabbitMQ instance using SSL:

```
start /wait Exivity_{version}_setup.exe /S ^
	/PSQL_INSTALLED=0 ^
		/PGUSER=exivityadmin /PGPASSWORD=S3cret!123 /PGHOST=db.exivity.local /PGPORT=5432 /PGDB=exivitydb ^
	/MQ_INSTALLED=0 ^
		/MQHOST=mq.exivity.local /MQPORT=5671 /MQUSER=exivity /MQPASSWORD=My5pecia1pas9 /MQVHOST=exvt /MQSSL=1 ^
	/WEB_INSTALLED=0 ^
	/JOBMAN_INSTALLED=1 ^
	/SCHEDULER_INSTALLED=1 ^
	/API_INSTALLED=1 ^
	/BACKEND_INSTALLED=1 
```

### Deploying a Web/API node

In order to deploy a Web/UI only node (with optional API), the following steps need to be executed manually or automatically thru the use of the silent installer CLI interface.

After starting the installer, click *Next* and provide a valid license key when asked. After clicking *Next* again, the component screen will be shown:

![](/files/-Mjiajq-1oL6R0XSY6n3)

Select the Web Service and optionally also the *API Service*. In some cases, the API can also be deployed on the front-end node, but if you are not certain, install only the *Web Service* on the front-end node, and the *API Service* on the backend nod&#x65;*.*

Click *Next* to continue. Then choose a folder for the Exivity program files, and afterward select a folder for the Exivity home files.

In the following screen, it will be required to specify the remote host and port of your Exivity API node:

![](/files/-M32KpoV9ogrOhGQz5xj)

{% hint style="warning" %}
Ensure that the Exivity API host is active and accepting connections. After clicking the *Next* button, the installer will issue a connection attempt to the Exivity API host
{% endhint %}

Once the installation is finished, ensure to check *'Start the Exivity Windows Services'* to start the Exivity services after clicking *Finish.*

#### Silent install Web/UI node

The below example will silently install an Exivity Web/UI node:

```
Exivity_{version}_setup.exe /S ^
	/EXIVITY_PROGRAM_PATH=C:\Exivity\Program /EXIVITY_HOME_PATH=D:\Exivity\home ^
	/PSQL_INSTALLED=0 ^
	/MQ_INSTALLED=0 ^
		/MQHOST=mq.exivity.local /MQPORT=5671 /MQUSER=exivity /MQPASSWORD=My5pecia1pas9 /MQVHOST=exvt /MQSSL=1 ^
	/JOBMAN_INSTALLED=0 ^
	/SCHEDULER_INSTALLED=0 ^
	/API_INSTALLED=0 ^
		/PROXIMITYHOST=remote.api.local /PROXIMITYPORT=443 ^
	/WEB_INSTALLED=1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://olddocs.exivity.io/3.5.4/getting-started/installation/on-premises/multi-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
