Deploy ColumnStore Object Storage Topology with MariaDB Server

Overview

This procedure describes the deployment of the ColumnStore Object Storage topology with MariaDB Enterprise Server 10.5, MariaDB Enterprise ColumnStore 5, and MariaDB MaxScale 2.5.

MariaDB Enterprise ColumnStore 5 is a columnar storage engine for MariaDB Enterprise Server 10.5. Enterprise ColumnStore is suitable for Online Analytical Processing (OLAP) workloads.

This procedure has 9 steps, which are executed in sequence.

This procedure represents basic product capability and deploys 3 Enterprise ColumnStore nodes and 1 MaxScale node.

This page provides an overview of the topology, requirements, and deployment procedures.

Please read and understand this procedure before executing.

Procedure Steps

Support

Customers can obtain support by submitting a support case.

Components

The following components are deployed during this procedure:

ComponentFunction
MariaDB Enterprise Server 10.5Modern SQL RDBMS with high availability, pluggable storage engines, hot online backups, and audit logging.
MariaDB MaxScale 2.5Database proxy that extends the availability, scalability, and security of MariaDB Enterprise Servers

MariaDB Enterprise Server Components

ComponentDescription
MariaDB Enterprise ColumnStore• Columnar storage engine
• Highly available
•Optimized for Online Analytical Processing (OLAP) workloads
• Scalable query execution
Cluster Management API (CMAPI) provides a REST API for multi-node administration.

MariaDB MaxScale Components

ComponentDescription
ListenerListens for client connections to MaxScale then passes them to the router service
MariaDB MonitorTracks changes in the state of MariaDB Enterprise Servers.
Read Connection RouterRoutes connections from the listener to any available Enterprise ColumnStore node
Read/Write Split RouterRoutes read operations from the listener to any available Enterprise ColumnStore node, and routes write operations from the listener to a specific server that MaxScale uses as the primary server
Server ModuleConnection configuration in MaxScale to an Enterprise ColumnStore node

Topology

es-columnstore-topology-s3-no-title

The MariaDB Enterprise ColumnStore topology with Object Storage delivers production analytics with high availability, fault tolerance, and limitless data storage by leveraging S3-compatible storage.

The topology consists of:

  • One or more MaxScale nodes
  • An odd number of ColumnStore nodes (minimum of 3) running ES, Enterprise ColumnStore, and CMAPI

The MaxScale nodes:

  • Monitor the health and availability of each ColumnStore node using the MariaDB Monitor (mariadbmon)
  • Accept client and application connections
  • Route queries to ColumnStore nodes using the Read/Write Split Router (readwritesplit)

The ColumnStore nodes:

  • Receive queries from MaxScale
  • Execute queries
  • Use S3-compatible object storage for data
  • Use shared local storage for the Storage Manager directory

Requirements

These requirements are for the ColumnStore Object Storage topology when deployed with MariaDB Enterprise Server 10.5, MariaDB Enterprise ColumnStore 5, and MariaDB MaxScale 2.5.

Node Count

  • MaxScale nodes, 1 or more are required.
  • Enterprise ColumnStore nodes, 3 or more are required for high availability. You should always have an odd number of nodes in a multi-node ColumnStore deployment to avoid split brain scenarios.

Operating System

In alignment to the enterprise lifecycle, the ColumnStore Object Storage topology with MariaDB Enterprise Server 10.5, MariaDB Enterprise ColumnStore 5, and MariaDB MaxScale 2.5 is provided for:

  • CentOS Linux 7 (x86_64)
  • Debian 10 (x86_64)
  • Red Hat Enterprise Linux 7 (x86_64)
  • Red Hat Enterprise Linux 8 (x86_64)
  • Ubuntu 18.04 LTS (x86_64)
  • Ubuntu 20.04 LTS (x86_64)

Minimum Hardware Requirements

MariaDB Enterprise ColumnStore's minimum hardware requirements are not intended for production environments, but the minimum hardware requirements can be appropriate for development and test environments. For production environments, see the recommended hardware requirements instead.

The minimum hardware requirements are:

ComponentCPUMemory
MaxScale node4+ cores4+ GB
Enterprise ColumnStore node4+ cores4+ GB

MariaDB Enterprise ColumnStore will refuse to start if the system has less than 3 GB of memory.

If Enterprise ColumnStore is started on a system with less memory, the following error message will be written to the ColumnStore system log called crit.log:

Apr 30 21:54:35 a1ebc96a2519 PrimProc[1004]: 35.668435 |0|0|0| C 28 CAL0000: Error total memory available is less than 3GB.

And the following error message will be raised to the client:

ERROR 1815 (HY000): Internal error: System is not ready yet. Please try again.

Recommended Hardware Requirements

MariaDB Enterprise ColumnStore's recommended hardware requirements are intended for production analytics.

The recommended hardware requirements are:

ComponentCPUMemory
MaxScale node8+ cores16+ GB
Enterprise ColumnStore node64+ cores128+ GB

Storage Requirements

The ColumnStore Object Storage topology requires the following storage types:

Storage TypeDescription
S3-Compatible Object StorageThe ColumnStore Object Storage topology uses S3-compatible object storage to store data.
Shared Local StorageThe ColumnStore Object Storage topology uses shared local storage for the Storage Manager directory to store metadata.

S3-Compatible Object Storage Requirements

The ColumnStore Object Storage topology uses S3-compatible object storage to store data.

Many S3-compatible object storage services exist. MariaDB Corporation cannot make guarantees about all S3-compatible object storage services, because different services provide different functionality.

For the preferred S3-compatible object storage providers that provide cloud and hardware solutions, see the following sections:

  • Cloud
  • Hardware

The use of non-cloud and non-hardware providers is at your own risk.

If you have any questions about using specific S3-compatible object storage with MariaDB Enterprise ColumnStore, contact us.

Preferred Object Storage Providers: Cloud

  • Amazon Web Services (AWS) S3
  • Google Cloud Storage
  • Azure Storage
  • Alibaba Cloud Object Storage Service

Preferred Object Storage Providers: Hardware

  • Cloudian HyperStore
  • Cohesity S3
  • Dell EMC
  • IBM Cloud Object Storage
  • Seagate Lyve Rack
  • Quantum ActiveScale

Shared Local Storage Directories

The ColumnStore Object Storage topology uses shared local storage for the Storage Manager directory to store metadata.

The Storage Manager directory is located at the following path by default:

  • /var/lib/columnstore/storagemanager

Shared Local Storage Options

The most common shared local storage options for the ColumnStore Object Storage topology are:

Shared Local StorageCommon UsageDescription
EBS (Elastic Block Store) Multi-AttachAWS• EBS is a high-performance block-storage service for AWS (Amazon Web Services).
• EBS Multi-Attach allows an EBS volume to be attached to multiple instances in AWS. Only clustered file systems, such as GFS2, are supported.
• For deployments in AWS, EBS Multi-Attach is a recommended option for the Storage Manager directory, and Amazon S3 storage is the recommended option for data.
EFS (Elastic File System)AWS• EFS is a scalable, elastic, cloud-native NFS file system for AWS (Amazon Web Services).
• For deployments in AWS, EFS is a recommended option for the Storage Manager directory, and Amazon S3 storage is the recommended option for data. EFS is a scalable, elastic, cloud-native NFS file system for AWS (Amazon Web Services).
FilestoreGCP• Filestore is high-performance, fully managed storage for GCP (Google Cloud Platform).
• For deployments in GCP, Filestore is the recommended option for the Storage Manager directory, and Google Object Storage (S3-compatible) is the recommended option for data.
GlusterFSOn-premises• GlusterFS is a distributed file system.
• GlusterFS supports replication and failover.
NFS (Network File System)On-premises• NFS is a distributed file system.
• If NFS is used, the storage should be mounted with the sync option to ensure that each node flushes its changes immediately.
• For on-premises deployments, NFS is the recommended option for the Storage Manager directory, and any S3-compatible storage is the recommended option for data.

Recommended Storage Options

For best results, MariaDB Corporation would recommend the following storage options:

EnvironmentObject Storage For DataShared Local Storage For Storage Manager
AWSAmazon S3 storageEBS Multi-Attach or EFS
GCPGoogle Object Storage (S3-compatible)Filestore
On-premisesAny S3-compatible object storageNFS

Enterprise ColumnStore Management with CMAPI

Enterprise ColumnStore's CMAPI (Cluster Management API) is a REST API that can be used to manage a multi-node Enterprise ColumnStore cluster.

Many tools are capable of interacting with REST APIs. For example, the curl utility could be used to make REST API calls from the command-line.

Many programming languages also have libraries for interacting with REST APIs.

The examples below show how to use the CMAPI with curl.

URL Endpoint Format for REST API

https://{server}:{port}/cmapi/{version}/{route}/{command}

For example:

With CMAPI 1.4 and later:

With CMAPI 1.3 and earlier:

Required Request Headers

  • 'x-api-key': '93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd'
  • 'Content-Type': 'application/json'

x-api-key can be set to any value of your choice during the first call to the server. Subsequent connections will require this same key.

Get Status

$ curl -k -s https://mcs1:8640/cmapi/0.4.0/cluster/status \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      | jq .

Start Cluster

$ curl -k -s -X PUT https://mcs1:8640/cmapi/0.4.0/cluster/start \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20}' \
      | jq .

Stop Cluster

$ curl -k -s -X PUT https://mcs1:8640/cmapi/0.4.0/cluster/shutdown \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20}' \
      | jq .

Add Node

  • With CMAPI 1.4 and later:
$ curl -k -s -X PUT https://mcs1:8640/cmapi/0.4.0/cluster/node \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20, "node": "192.0.2.2"}' \
      | jq .
  • With CMAPI 1.3 and earlier:
$ curl -k -s -X PUT https://mcs1:8640/cmapi/0.4.0/cluster/add-node \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20, "node": "192.0.2.2"}' \
      | jq .

Remove Node

  • With CMAPI 1.4 and later:
$ curl -k -s -X DELETE https://mcs1:8640/cmapi/0.4.0/cluster/node \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20, "node": "192.0.2.2"}' \
      | jq .
  • With CMAPI 1.3 and earlier:
$ curl -k -s -X PUT https://mcs1:8640/cmapi/0.4.0/cluster/remove-node \
      --header 'Content-Type:application/json' \
      --header 'x-api-key:93816fa66cc2d8c224e62275bd4f248234dd4947b68d4af2b29671dd7d5532dd' \
      --data '{"timeout":20, "node": "192.0.2.2"}' \
      | jq .

Quick Reference

MariaDB Enterprise Server Configuration Management

MethodDescription
Configuration FileConfiguration files (such as /etc/my.cnf) can be used to set system-variables and options. The server must be restarted to apply changes made to configuration files.
Command-lineThe server can be started with command-line options that set system-variables and options.
SQLUsers can set system-variables that support dynamic changes on-the-fly using the SET statement.

MariaDB Enterprise Server packages are configured to read configuration files from different paths, depending on the operating system. Making custom changes to Enterprise Server default configuration files is not recommended because custom changes may be overwritten by other default configuration files that are loaded later.

To ensure that your custom changes will be read last, create a custom configuration file with the z- prefix in one of the include directories.

DistributionExample Configuration File Path
• CentOS
• Red Hat Enterprise Linux (RHEL)
/etc/my.cnf.d/z-custom-mariadb.cnf
• Debian
• Ubuntu
/etc/mysql/mariadb.conf.d/z-custom-mariadb.cnf

MariaDB Enterprise Server Service Management

The systemctl command is used to start and stop the MariaDB Enterprise Server service.

OperationCommand
Startsudo systemctl start mariadb
Stopsudo systemctl stop mariadb
Restartsudo systemctl restart mariadb
Enable during startupsudo systemctl enable mariadb
Disable during startupsudo systemctl disable mariadb
Statussudo systemctl status mariadb

For additional information, see "Start and Stop Services".

MariaDB Enterprise Server Logs

MariaDB Enterprise Server produces log data that can be helpful in problem diagnosis.

Log filenames and locations may be overridden in the server configuration. The default location of logs is the data directory. The data directory is specified by the datadir system variable.

LogSystem Variable/OptionDefault Filename
MariaDB Error Loglog_error<hostname>.err
MariaDB Enterprise Audit Logserver_audit_file_pathserver_audit.log
Slow Query Logslow_query_log_file<hostname>-slow.log
General Query Loggeneral_log_file<hostname>.log
Binary Loglog_bin<hostname>-bin

Enterprise ColumnStore Service Management

The systemctl command is used to start and stop the ColumnStore service.

OperationCommand
Startsudo systemctl start mariadb-columnstore
Stopsudo systemctl stop mariadb-columnstore
Restartsudo systemctl restart mariadb-columnstore
Enable during startupsudo systemctl enable mariadb-columnstore
Disable during startupsudo systemctl disable mariadb-columnstore
Statussudo systemctl status mariadb-columnstore

In the ColumnStore Object Storage topology, the mariadb-columnstore service should not be enabled. The CMAPI service restarts Enterprise ColumnStore as needed, so it does not need to start automatically upon reboot.

Enterprise ColumnStore CMAPI Service Management

The systemctl command is used to start and stop the CMAPI service.

OperationCommand
Startsudo systemctl start mariadb-columnstore-cmapi
Stopsudo systemctl stop mariadb-columnstore-cmapi
Restartsudo systemctl restart mariadb-columnstore-cmapi
Enable during startupsudo systemctl enable mariadb-columnstore-cmapi
Disable during startupsudo systemctl disable mariadb-columnstore-cmapi
Statussudo systemctl status mariadb-columnstore-cmapi

For additional information on endpoints, see "CMAPI".

MaxScale Configuration Management

MaxScale can be configured using several methods. These methods make use of MaxScale's REST API.

MethodBenefits
MaxCtrlCommand-line utility to perform administrative tasks through the REST API. See MaxCtrl Commands.
MaxGUIMaxGUI is a graphical utility that can perform administrative tasks through the REST API.
REST APIThe REST API can be used directly. For example, the curl utility could be used to make REST API calls from the command-line. Many programming languages also have libraries to interact with REST APIs.

The procedure on these pages configures MaxScale using MaxCtrl.

MaxScale Service Management

The systemctl command is used to start and stop the MaxScale service.>

OperationCommand
Startsudo systemctl start maxscale
Stopsudo systemctl stop maxscale
Restartsudo systemctl restart maxscale
Enable during startupsudo systemctl enable maxscale
Disable during startupsudo systemctl disable maxscale
Statussudo systemctl status maxscale

For additional information, see "Start and Stop Services".

Next Step

Navigation in the procedure "Deploy ColumnStore Object Storage Topology":

Next: Step 1: Prepare ColumnStore Nodes.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
Back to Top