Skip to content

Create a Read Replica Set

POST/projects/{project_id}/services/{service_id}/replicaSets

Creates a new read replica set for a service. This is an asynchronous operation.

Path ParametersExpand Collapse
project_id: string
service_id: string
Body ParametersJSONExpand Collapse
cpu_millis: number

The initial CPU allocation in milli-cores.

minimum1
memory_gbs: number

The initial memory allocation in gigabytes.

minimum1
name: string

A human-readable name for the read replica.

minLength1
maxLength128
nodes: number

Number of nodes to create in the replica set.

minimum1
ReturnsExpand Collapse
ReadReplicaSet object { id, cpu_millis, memory_gbs, 6 more }

A set of read replicas for a service.

id: string

The unique identifier for the read replica set.

cpu_millis: number

CPU allocation in milli-cores.

memory_gbs: number

Memory allocation in gigabytes.

name: string

The name of the read replica set.

nodes: number

Number of nodes in the replica set.

status: "creating" or "active" or "resizing" or 2 more

The current status of the read replica set:

  • creating: the replica set is being provisioned
  • active: the replica set is provisioned and serving traffic
  • resizing: the replica set is being resized
  • deleting: the replica set is being deleted
  • error: the replica set is in an error state
One of the following:
"creating"
"active"
"resizing"
"deleting"
"error"
connection_pooler: optional ConnectionPooler { endpoint }

Connection pooler configuration for a service.

endpoint: optional Endpoint { host, port }

A network endpoint for connecting to a service.

host: optional string

The hostname of the endpoint.

port: optional number

The port of the endpoint.

endpoint: optional Endpoint { host, port }

A network endpoint for connecting to a service.

host: optional string

The hostname of the endpoint.

port: optional number

The port of the endpoint.

metadata: optional object { environment }

Additional metadata for the read replica set.

environment: optional string

Environment tag for the read replica set.

Create a Read Replica Set

curl https://console.cloud.tigerdata.com/public/api/v1/projects/$PROJECT_ID/services/$SERVICE_ID/replicaSets \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "cpu_millis": 250,
          "memory_gbs": 1,
          "name": "my-reporting-replica",
          "nodes": 2
        }'
{
  "id": "alb8jicdpr",
  "cpu_millis": 250,
  "memory_gbs": 1,
  "name": "reporting-replica-1",
  "nodes": 2,
  "status": "active",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "metadata": {
    "environment": "PROD"
  }
}
Returns Examples
{
  "id": "alb8jicdpr",
  "cpu_millis": 250,
  "memory_gbs": 1,
  "name": "reporting-replica-1",
  "nodes": 2,
  "status": "active",
  "connection_pooler": {
    "endpoint": {
      "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
      "port": 32625
    }
  },
  "endpoint": {
    "host": "i4wmp4crev.oec7sxsza2.tsdb.cloud.timescale.com",
    "port": 32625
  },
  "metadata": {
    "environment": "PROD"
  }
}