-
Notifications
You must be signed in to change notification settings - Fork 332
/
Copy pathrest-views-requests.dita
104 lines (84 loc) · 4.76 KB
/
rest-views-requests.dita
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference xml:lang="en-us" id="rest-views-requests">
<title>Limiting Views Requests</title>
<shortdesc>To limit the number of simultaneous view request on a server node, use the <codeph>POST /internalSettings</codeph> HTTP method and URI
and a port-related request parameter.</shortdesc>
<refbody>
<section><title>Description</title>
<note type="warning">The settings detailed on this page are meant for performance tuning. Rigorous and careful testing of any changes to these settings should be made in a non-production environment that is representative, in load and scale, of production data before implementing in production. Incorrect settings can cause severe impacts to cluster performance or operation due to resource consumption. Couchbase makes no recommendations for tuning beyond the default settings. Any changes to these settings not explicitly recommended by Couchbase Employees are not supported by Couchbase.</note>
<p>Couchbase Server provides limits to incoming connections on a server node.
The limits are to prevent the server from becoming overwhelmed.
When a limit is exceeded, the server rejects the incoming connection,
responds with a 503 HTTP status code, and sets the HTTP Retry-After header.</p>
<ul>
<li>If the request is made to a REST port, the response body provides the
reason for the rejection.</li>
<li>If the request is made on a CAPI port, such as a views
request, the server responds with a JSON object with error and reason fields.</li>
</ul>
</section>
<section><title>HTTP method and URI</title>
<codeblock>POST /internalSettings</codeblock>
<p>Parameters:</p>
<p>The following are port-related request parameters:</p>
<p>By default, these settings do not have a limit. </p>
<ul>
<li>restRequestLimit
<p>Maximum number of simultaneous connections each server node accepts on a REST port.
Diagnostic-related requests and <codeph>/internalSettings</codeph> requests are not counted in this limit.</p></li>
<li>capiRequestLimit
<p>Maximum number of simultaneous connections each server node accepts on a CAPI port.
This port is used for XDCR and views connections.</p></li>
<li>dropRequestMemoryThresholdMiB
<p>Value in MB. The maximum amount of memory that is used by Erlang VM.
If the amount is exceeded, the server starts dropping incoming connections.</p></li>
</ul>
<note type="important">Keep the default setting unless you experience issues with too many requests impacting a node.
If these thresholds are set too low, too many requests are rejected by the server,
including requests from the Couchbase web console.</note>
</section>
<section><title>Syntax</title>
<p>Curl request syntax:</p>
<codeblock>curl -X POST -u [admin]:[password]
http://[localhost]:8091/internalSettings
-d capiRequestLimit=[value]</codeblock>
</section>
<section><title>Example</title>
<p>Curl request example:</p>
<p>The following example limits the number of simultaneous views requests and internal XDCR requests which can be made on a port.</p>
<codeblock>curl -X POST -u Administrator:password \
http://10.5.2.117:8091/internalSettings \
-d 'capiRequestLimit=50' \
-d 'restRequestLimit=50'</codeblock>
</section>
<section><title>Response</title>
<p>No response is returned with a curl request changing the rest or capi request limit.
Retrieve the internal settings to see changes.</p>
<p>The following example retrieves and shows the internal settings with the rest and capi request limits set to 50:</p>
<codeblock>curl -u Administrator:password http://10.5.2.117:8091/internalSettings
{
"capiRequestLimit": 50,
"dropRequestMemoryThresholdMiB": "",
"indexAwareRebalanceDisabled": false,
"maxBucketCount": 10,
"maxParallelIndexers": 6,
"maxParallelReplicaIndexers": 2,
"rebalanceIgnoreViewCompactions": false,
"rebalanceIndexPausingDisabled": false,
"rebalanceIndexWaitingDisabled": false,
"rebalanceMovesBeforeCompaction": 64,
"rebalanceMovesPerNode": 1,
"restRequestLimit": 50,
"xdcrAnticipatoryDelay": 0,
"xdcrCheckpointInterval": 1800,
"xdcrDocBatchSizeKb": 2048,
"xdcrFailureRestartInterval": 30,
"xdcrMaxConcurrentReps": 32,
"xdcrOptimisticReplicationThreshold": 256,
"xdcrWorkerBatchSize": 500
}
</codeblock>
</section>
</refbody>
</reference>