Step 1: Install Enterprise Spider

Overview

This page details step 1 of the 3-step procedure "Deploy Spider Sharded Topology".

This step installs the Enterprise Spider storage engine plugin on the Spider Node.

Interactive commands are detailed. Alternatively, the described operations can be performed using automation.

Allow Interconnect

MariaDB Enterprise Spider depends on interconnect between the Spider Node and all Data Nodes. This may require adjustment to firewall and security settings.

Install via APT (Debian/Ubuntu)

On Debian and Ubuntu, the Enterprise Spider storage engine is not installed with MariaDB Enterprise Server 10.4 by default. An additional package must be installed.

On other operating systems, the Enterprise Spider storage engine is installed with MariaDB Enterprise Server 10.4 by default.

On the Spider Node, install MariaDB Enterprise Spider:

$ sudo apt install mariadb-plugin-spider

Load the Spider Plugin

The Enterprise Spider storage engine plugin must be loaded by MariaDB Enterprise Server 10.4.

On the Spider Node, use one of the following methods to configure MariaDB Enterprise Server 10.4 to load the Enterprise Spider storage engine plugin:

Interface

Method

Benefits

Shell

Configuration File

  • SQL access is not required

  • SUPER privilege is not required

  • Configuration file can be version controlled

SQL

INSTALL SONAME Statement

  • Shell access is not required

  • File system privileges on configuration file are not required

  • Plugin is included in backup of mysql.plugin system table

  • Spider Node restart is not required

Load Spider with Configuration File

On the Spider Node, set the plugin_load_add option to ha_spider in a configuration file. The plugin_load_add option configures MariaDB Enterprise Server 10.4 to load the Enterprise Spider storage engine plugin. The Spider Node must be restarted to detect the configuration change.

  1. Choose a configuration file for custom changes to system variables and options.

    It is not recommended to make custom changes to Enterprise Server's default configuration files, because your custom changes can be overwritten by other default configuration files that are loaded after.

    Ensure that your custom changes will be read last by creating a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. Ensure that your custom configuration file is read last by using the z- prefix in the file name.

    Some example configuration file paths for different distributions are shown in the following table:

    Distributions

    Example configuration file path

    CentOS
    RHEL
    SLES

    /etc/my.cnf.d/z-custom-mariadb.cnf

    Debian
    Ubuntu

    /etc/mysql/mariadb.conf.d/z-custom-mariadb.cnf

  1. Set the plugin_load_add option in the configuration file.

    It must be set in a group that will be read by MariaDB Server, such as [mariadb] or [server].

    For example:

    [mariadb]
    ...
    plugin_load_add = "ha_spider"
    
  2. Restart MariaDB Enterprise Server:

    $ sudo systemctl restart mariadb
    

Load Spider with INSTALL SONAME

On the Spider Node, execute the INSTALL SONAME statement with the library name ha_spider. The INSTALL SONAME statement configures MariaDB Enterprise Server 10.4 to load the Enterprise Spider storage engine plugin. The INSTALL SONAME statement requires the SUPER privilege.

The INSTALL SONAME statement adds the Enterprise Spider storage engine to the mysql.plugin system table. When the Spider Node is restarted, MariaDB Enterprise Server reads the system table and reloads the plugin, so the statement only needs to be executed once.

  1. Connect to the Spider Node using MariaDB Client:

    $ sudo mariadb
    
  2. Use the INSTALL SONAME statement to install the Enterprise Spider storage engine plugin:

    INSTALL SONAME "ha_spider";
    

Test Plugin Installation

On the Spider Node, confirm that the Enterprise Spider storage engine plugin is loaded by querying the information_schema.PLUGINS table:

SELECT PLUGIN_NAME, PLUGIN_STATUS
FROM information_schema.PLUGINS
WHERE PLUGIN_LIBRARY LIKE "ha_spider%";
+--------------------------+---------------+
| PLUGIN_NAME              | PLUGIN_STATUS |
+--------------------------+---------------+
| SPIDER                   | ACTIVE        |
| SPIDER_ALLOC_MEM         | ACTIVE        |
| SPIDER_WRAPPER_PROTOCOLS | ACTIVE        |
+--------------------------+---------------+

When the Enterprise Spider storage engine is loaded, the PLUGIN_NAME column contains the value SPIDER and the PLUGIN_STATUS column contains the value ACTIVE.

Next Step

Navigation in the procedure "Deploy Spider Sharded Topology":

  • This page was step 1 of 3.