In this document, we’ll show you how to set up Oxla multi-node deployment.

Prerequisites

  • Single node per machine
  • Docker installed
  • x86 64bit CPU (Intel or AMD)
  • PostgresSQL client installed
  • N machines with ssh access to them (N: number of nodes that you want to deploy)
  • Networking configured so that all nodes can connect to each other (by default OXLA requires 5769 and 5770 ports for inter node communication and exposes sql interface on 5432 port)

Installation on Each Node

Firstly, open your terminal command and execute this command to check if you have installed Docker properly:

docker ps

Then, execute the following command to create a file that contains docker compose file:

vim multi_node.yml

After that, input the following code into the docker compose file for each node and replace placeholder values with appropriate ones:

  • NETWORK__HOST_NAME: Oxla node hostname (must be unique for every node)
  • LEADER_ELECTION__LEADER_NAME: hostname of the node that will be the leader of the cluster
  • OXLA_NODES: ; separated list of the addresses of all the nodes in the cluster
  • OXLA_HOME: path to S3 bucket that will be used as storage
  • AWS\_DEFAULT\_REGION, AWS\_ACCESS\_KEY\_ID, AWS\_SECRET\_ACCESS\_KEY: S3 bucket credentials
version: '3.5'

volumes:
  oxla_data:

services:
  oxla_node:
    image: public.ecr.aws/oxla/release:latest
    security_opt:
      - seccomp:unconfined
    ulimits:
      nofile:
        soft: 40000
        hard: 40000
    ports:
      - 5432:5432
    environment:
      - NETWORK__HOST_NAME=oxla_node_1
      - LEADER_ELECTION__LEADER_NAME=oxla_node_1
      - OXLA_NODES=192.168.0.1;192.168.0.2;192.168.0.3
      - OXLA_HOME=s3://yourdirectoryname
      - AWS_DEFAULT_REGION=AWS_DEFAULT_REGION
      - AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY

Eventually, execute the following command to create and start the docker container:

docker compose -f multi_node.yml up
Please ensure that you repeat all of the steps above on all of the nodes

Connecting to Oxla

You can now connect to the cluster using the following command:

psql -h IP_ADDRESS

Important Notes

  • Ensure that all the machines that you are using to deploy Oxla are connected in the same network
  • Depending on your computer’s RAM capacity, you may need to adjust the OXLA_MAX_NON_QUERY_MEM environment variable value to optimize performance. For example OXLA_MAX_NON_QUERY_MEM=4194304
  • Replace IP_ADDRESS with one of the IP addresses that you set up in your YAML file.