Over the following steps, we’ll show you how to set up and deploy Oxla multi-node database. Let’s get started!

In this tutorial, we will show you how to deploy Oxla with three nodes. If you want to deploy more than that, simply update and adjust the yaml configuration per tutorial below.

Prerequisite

⚠️ There shall be always a single node per machine.

⚠️ Install Docker. Please refer to this page for further details.

⚠️ x86 64bit CPU (Intel or AMD).

⚠️ Install PostgresSQL-client-14 for psql connection. Please refer to this page.

⚠️ Grab N machines with ssh access to them. The N number refers to the number of nodes that you want to deploy.

⚠️ Configure the networking so that all nodes can connect to each other.

Installation on Each Node

  • Open your terminal command and execute this command to check if you have installed your docker properly.
docker ps
If it returns “Bad response from Docker engine”, this means there is an issue with your docker engine. Try re-install your docker.
  • Execute the following command to create a file that contains docker compose file:
vim multi_node.yml
  • Input the following code into the docker compose file for each node:
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:
      - FORCED_REVOKE_TIMEOUT_MS=1500
      - BUFFER_TIMEOUT=1
      - HOST_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
Don’t forget to replace the following values with appropriate values:
- 192.168.0.1; 192.168.0.2; 192.168.0.3
- s3://yourdirectoryname
- AWS_DEFAULT_REGION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Please ensure you the three machines that you are using to deploy Oxla is connected in a same network.
Depending on your computer’s RAM capacity, you may need to adjust the environment variable to optimize performance. You can set OXLA_MAX_NON_QUERY_MEM to a custom number.
For example OXLA_MAX_NON_QUERY_MEM=4194304
  • Execute the following command to create and start the docker container:
docker compose -f multi_node.yml up
  • Execute the following command to run Oxla:
psql -h IP_ADDRESS
Please replace IP_ADDRESS with one of the IP addresses that you setup in your yaml file. If you encounter an error response “bash: psql: command not found“, this means that you have not installed PostgreSQL.
Please ensure that you repeat all of the steps above on all of the nodes.