Timescale Cloud: Scale, Enterprise

Self-hosted products

MST

You use read replica sets in Timescale Cloud for horizontal read scaling, to power your read-intensive apps and business intelligence tooling. Additionally, using the replica sets to serve reads for your app unloads the primary data instance and enables your service to improve ingest performance. This is particularly useful when read traffic is very spiky and risks impacting ingest performance, or where reads have a lower priority to writes.

This page shows you how to create and manage read replica sets in Timescale Console.

A read replica is a read-only copy of your primary database instance. Queries on read replicas have minimal impact on the performance of the primary instance. This enables you to interact with up-to-date production data for analysis, or to scale out reads beyond the limits of your primary instance. Read replicas can be short-lived and deleted when a session of data analysis is complete, or long-running to power an application or a business intelligence tool.

A read replica set in Timescale Cloud is a group of one or more read replica nodes that are accessed through the same endpoint. You query each set as a single replica. Timescale Cloud balances the load between the nodes in the set for you.

Read scaling in Timescale

You can create as many read replica sets as you need. For security and resource isolation, each read replica set has unique connection details.

You use read replica sets for horizontal read scaling. To limit data loss for your Timescale Cloud services, use high-availability replicas.

To follow this procedure:

  • Create a target Timescale Cloud service.

  • Create a read-only user on the primary data instance.

    A user with read-only permissions cannot make changes in the primary database. This user is propagated to the read replica set when you create it.

To create a secure read replica set for your read-intensive apps:

  1. In Timescale Console, select your target service

  2. Click Operations > Read scaling > Add a read replica set

  3. Configure your replica set

    Configure the number of nodes, compute size, connection pooling, and the name for your replica, then click Create read replica set.

    Create a read replica set in Timescale Console

  4. Save the connection information

    The username and password of a read replica set are the same as the primary service. They cannot be changed independently.

    The connection information for each read replica set is unique. You can add or remove nodes from an existing set and the connection information of that set will remain the same. To find the connection information for an existing read replica set:

    1. Select the primary service in Timescale Console.

    2. Click Operations > Read scaling.

    3. Click the 🔗 icon next to the replica set in the list.

You can edit an existing read replica set to better handle your reads. This includes changing the number of nodes, compute size, storage, and IOPS, as well as configuring VPC and other features.

To change the compute and storage configuration of your read replica set:

  1. In Timescale Console, expand and click the read replica set under your primary service

    Read replicas in Timescale Console

  2. Click Operations > Compute and storage

    Read replica compute and storage in Timescale Console

  3. Change the replica configuration and click Apply

Read replica sets use asynchronous replication. This can cause a slight lag in data to the primary database instance. The lag is measured in bytes, against the current state of the primary instance. To check the status and lag for your read replica set:

  1. In Timescale Console, select your primary service

  2. Click Operations > Read scaling

    You see a list of configured read replica sets for this service, including their status and lag:

    Read replica sets

  3. Configure the allowable lag

    1. Select the replica set in the list.

    2. Click Operations > Database parameters.

    3. Adjust max_standby_streaming_delay and max_standby_archive_delay.

      This is not recommended for cases where changes must be immediately represented, for example, for user credentials.

To delete a replica set:

  1. In Timescale Console, select your primary service

  2. Click Operations > Read scaling

  3. Click the trash icon next to a replica set

    Confirm the deletion when prompted.

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.