Set up multi-node on self-hosted TimescaleDB
When you have installed TimescaleDB on the access node and as many data nodes as you require, you can set up multi-node and create a distributed hypertable.
Before you begin, make sure you have considered what partitioning method you want to use for your multi-node cluster. For more information about multi-node and architecture, see the About multi-node section.
Setting up multi-node on self-hosted TimescaleDB
On the access node (AN), run this command and provide the hostname of the first data node (DN1) you want to add:
Repeat for all other data nodes:
On the access node, create the distributed hypertable with your chosen partitioning. In this example, the distributed hypertable is called
example, and it is partitioned ontimeandlocation:Insert some data into the hypertable. For example:
When you have set up your multi-node installation, you can configure your cluster. For more information, see the [configuration section][configuration].
===== PAGE: https://docs.tigerdata.com/self-hosted/multinode-timescaledb/multinode-auth/ =====
Examples:
Example 1 (sql):
SELECT add_data_node('dn1', 'dn1.example.com')Example 2 (sql):
SELECT add_data_node('dn2', 'dn2.example.com')
SELECT add_data_node('dn3', 'dn3.example.com')Example 3 (sql):
SELECT create_distributed_hypertable('example', 'time', 'location');Example 4 (sql):
INSERT INTO example VALUES ('2020-12-14 13:45', 1, '1.2.3.4');