Overview

Oxla configuration is managed through a configuration file, which defines various aspects of Oxla’s usage and is helpful for both development and deployment. When Oxla is being run as a docker container, the config file is generated automatically inside a container in /oxla/startup_config, based on environment variables and default values.

Mounting Config Directory

The /oxla/startup_config config directory can be mounted using -v /path/to/mount:/oxla/startup_config command to access the config file directly:

docker run --rm -it -p 5432:5432 -v /path/to/mount:/oxla/startup_config public.ecr.aws/oxla/release:latest

Configuring File Handling

Variables Configuration

The YAML file below is the default configuration file in Oxla:

network:
  port: 5769
  postgresql_port: 5432
  prometheus_port: 8080
  nodes:
    - "localhost"
  cluster_name: "cluster_1"
  host_name: "oxla_node_1"

metrics:
  no_prometheus_exposer: false

insertion:
  buffer_size_limit: 42M
  buffer_timeout: 100 ms

logging:
  level: "INFO"

storage:
  oxla_home: "/oxla/data"
  s3:
    enable_discovery: true
    use_dual_stack: true
    endpoint: ""

access_control:
  mode: DEFAULT

Below is a list of key configuration variables:

VariableDescription
network.portPort on which Oxla listens for connections from nodes in the cluster.
network.postgresql_portPort on which the node listens for TCP connections to the PostgreSQL client.
network.prometheus_portPort on which the process listens for HTTP connections for Prometheus metrics.
network.nodesList of IP addresses or DNS addresses to which Oxla connects.
network.cluster_nameCommon cluster name used for node connection validation.
network.host_nameUnique name of a single node in the cluster.
metrics.no_prometheus_exposerOption for disabling the Prometheus exposer.
insertion.buffer_size_limitThreshold for data or time before dumping data from memory to the filesystem.
Possible units:
- G
- M
- K
Default value: interpreted as bytes.
insertion.buffer_timeoutTimeout for dumping data from memory to the filesystem.
Possible units:
- h
- min
- s
- ms
Default value: value in ms unit.
logging.infoLogging level.
Possible values:
- VERBOSE
- DEBUG
- INFO
- WARNING
- ERROR
- FATAL
- NONE
storage.oxla_homeDirectory for data. Either on local disk (path inside the container), or on S3.
storage.s3.enable_discoveryBy default, regional or overridden endpoints are used. To enable endpoint discovery, set the variable to true.
storage.s3.use_dual_stackEnable or disable dual-stack IPv4 and IPv6 endpoints.
Note: not all AWS services support IPv6 in all Regions.
storage.s3.endpointEndpoint for the S3 protocol. If not provided, the default AWS endpoint is used.
access_control.modeMode of access control that Oxla sticks to during connection and execution of queries by connected users.
For more details, check Access Control docs.
Possible values:
- DEFAULT - keeps the default behaviour of Oxla
- OFF - turns off the access control. There is no validation of users at all. Everyone can login and execute any query.
- ON - turns on the acces control, hence all the validations are executed.

Environment Variables

Values in the configuration file take precedence over environment variables and default values. Naming conventions for environment variables are derived from the configuration variable names, with __ (double underscore) replacing YAML hierarchy levels. For example:

network:
  port: 5769
The port is expressed as the NETWORK__PORT environment variable

Environment variables can be passed using the -e parameter in the docker run command, as presented below:

docker run --rm -it -p 5432:5432 -e INSERTION__BUFFER_TIMEOUT=1ms public.ecr.aws/oxla/release:latest