Manage Backup Service Threads
- Couchbase Server 7.6.2
You can change the number of threads a Backup Service node uses when backing up data.
HTTP Methods and URIs
GET /api/v1/nodesThreadsMap
POST /api/v1/nodesThreadsMap
PATCH /api/v1/nodesThreadsMap
Description
The nodesThreadMap
endpoint lets you change the number of threads the Backup Service uses on a node.
The default number of threads the Backup Service uses is based on the number of CPU cores in the node: \(\max(1, cpu\_cores \times 0.75)\).
The number of threads also sets the number of concurrent client connections the service uses to retrieve data from nodes in the cluster.
Each thread creates one connection.
See Thread Usage for more information about how the number of threads affects the Backup Service.
Curl Syntax
curl -u $USER:$PASSWORD -X GET \
http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/nodesThreads
curl -u Administrator:password -X POST \
http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/nodesThreadsMap \
-d <nodes_thread_map>
curl -u Administrator:password -X PATCH \
http://$BACKUP_SERVICE_NODE:$BACKUP_SERVICE_PORT/api/v1/nodesThreadsMap \
-d <nodes_thread_map>
Name | Description | Schema |
---|---|---|
|
An object that sets the number of threads for Backup Service nodes.
When you use the |
{"nodes_threads_map": {
<backup_node_uuid>:<threads>, . . .
}
}
Name | Description | Schema |
---|---|---|
|
The unique identifier for a node running the Backup Service.
You can get this value from the |
string |
|
The number of threads for the Backup Service to use. When set to |
integer |
Responses
Value | Description |
---|---|
|
Successful calls to When calling the |
|
User does not have the proper permission to call the API endpoint. In addition, the call returns a JSON object similar to the following:
|
|
The resource was not found. If you call the
|
Required Permissions
-
GET
: Full Admin, Backup Full Admin, Read-Only Admin -
POST
andPATCH
: Full Admin, Backup Full Admin
Examples
curl -s -u Administrator:password -X \
POST http://localhost:8097/api/v1/nodesThreadsMap \
-d '{"nodes_threads_map":{"cb5c77719df4f33131251afdca00531a":1}}'
curl -s -u Administrator:password -X \
GET http://node3:8097/api/v1/nodesThreadsMap | jq
The previous example returns output similar to the following:
{
"cb5c77719df4f33131251afdca00531a": 1
}
See Also
-
For a an overview of the Backup Service, see Backup Service.
-
For a step-by-step guide to configure and use the Backup Service using the Couchbase Server Web Console, see Manage Backup and Restore.
-
See Thread Usage for more information about how the number of threads affects the Backup Service.