Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions modules/learn/pages/services-and-indexes/services/services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Services are configured and deployed by the Full Administrator who initializes C
The standard configuration-sequence allows a subset of services to be selected per node, with an individual memory-allocation for each.
Each service supports a particular form of data-access.
Services not required need not be deployed.
Services intended to support a heavy workload can be deployed across multiple cluster-nodes, to ensure optimal performance and resource-availability.
Services intended to support a heavy workload can be deployed across multiple cluster-nodes to ensure optimal performance and resource-availability.

In Couchbase Server Version 7.6 and later, you can add one or more arbiter nodes to your cluster.
include::learn:partial$arbiter-node-benefits.adoc[]
Expand All @@ -21,14 +21,14 @@ include::learn:partial$arbiter-node-benefits.adoc[]

Couchbase Server provides the following services:

* *Data*: Supports the storing, setting, and retrieving of data-items, specified by key.
* *Data*: Supports the storing, setting, and retrieving of data-items, specified by a key.
* *Query*: Parses queries specified in the _N1QL_ query-language, executes the queries, and returns results.
The Query Service interacts with both the Data and Index services.
* *Index*: Creates indexes, for use by the Query and Analytics services.
* *Search*: Create indexes specially purposed for _Full Text Search_.
* *Search*: Create indexes specially purposed for _Full-Text Search_.
This supports language-aware searching; allowing users to search for, say, the word `beauties`, and additionally obtain results for `beauty` and `beautiful`.
* *Analytics*: Supports join, set, aggregation, and grouping operations; which are expected to be large, long-running, and highly consumptive of memory and CPU resources.
* *Eventing*: Supports near real-time handling of changes to data: code can be executed both in response to document-mutations, and as scheduled by timers.
* *Eventing*: Supports near real-time handling of changes to data: code can be executed both in response to document mutations and as scheduled by timers.
* *Backup*: Supports the scheduling of full and incremental data backups, either for specific individual buckets, or for all buckets on the cluster.
Also allows the scheduling of _merges_ of previously made backups.

Expand All @@ -40,36 +40,41 @@ workload-requirements.
[#setting-up-services]
== Setting Up Services

Services are set up on a per node basis.
Services are set up on a per-node basis.
Each node can run at most one instance of a service.
Each node can run any number of services, up to the maximum, which is seven.
In Couchbase Enterprise Server Version 7.6+, a node can be configured to run _no_ service.
The _Data Service_ must run on at least one node of the cluster.
Some services are interdependent, and therefore require at least one instance of
each of their dependencies to be running on the cluster (for example, the
Some services are interdependent and therefore require at least one instance of
each of their dependencies to be running on the cluster (for example, the
_Query Service_ depends on the _Index Service_ and on the _Data Service_).

When the first node in a cluster is initialized, the services assigned to it become the default assignment for each other node subsequently to be added to the cluster.
However, this default can be departed from, node by node; with one or more services omitted from the default, and one or more added.
However, this default can be departed from, node by node, with one or more services omitted from the default, and one or more added.

When first allocated to a node, a service requires the assignment of a specific memory quota, which becomes standard for that service in each of its instances across the cluster.
(The exceptions to this are the Query and Backup Services, which never require a memory quota.)

Service-allocation should be designed based on workload-analysis: if a particular service is expected to handle a heavy workload, it should be allocated with a larger memory quota, and potentially as the only service on the node.
Alternatively, if a cluster is to be used for development purposes only, it may be convenient to allocate services in the quickest and most convenient way, with some quotas being equal.
Service allocation should be designed based on workload-analysis:
if a particular service is expected to handle a heavy workload,
it should be allocated with a larger memory quota, and potentially as the only service on the node.
Alternatively, if a cluster is to be used for development only,
it may be convenient to allocate services in the quickest and most convenient way,
with some quotas being equal.

For example, the following illustration shows how four services — Data, Index, Query, and Search — might be allocated evenly across the five nodes of a _development_ cluster:

[#cb_cluster_with_services_development]
image::services-and-indexes/services/cbClusterWithServicesDevelopment.png[,720,align=left]
include::partial$cluster-example-diagrams.adoc[tag="five-cluster-setup"]

This configuration might provide perfectly acceptable performance for each of the four services, in the context of development and testing.
However, if a large amount of data needed, in production, to be intensively indexed, and addressed by means of Query and Search, the following configuration would be more efficient:
However, if a large amount of data is required to be intensively indexed and addressed by means of Query and Search, the following production configuration would be more efficient:

[#cb_cluster_with_services_production]
image::services-and-indexes/services/cbClusterWithServicesProduction.png[,720,align=left]
include::partial$cluster-example-diagrams.adoc[tag="six-cluster-setup"]

In this revised configuration, the Data Service is the only service to run on two of the nodes; the Index Service the only service on two futher nodes; and the Query and Search Services share the fifth and final node.
In this revised configuration, the Data Service is the only service to run on three of the nodes;
the Index Service is running on two further nodes; and the Query and Search Services share the sixth and final node.

For a more detailed explanation of service memory quotas, see xref:buckets-memory-and-storage/memory.adoc[Memory].
For information on the practical steps required to initialize a cluster, including the allocation of services to nodes, see
Expand All @@ -86,9 +91,9 @@ nodes can be removed, reconfigured to run the Search Service, and re-added to th
cluster.

Alternatively, additional hardware-resources (CPU, memory, disk-capacity) can be
added to targeted nodes in the cluster, in order to support the performance of
key services. This ability to provision services independently from one another, and
thereby
scale their performance individually up and down as required, provides the greatest
flexibility in terms of handling changing business requirements, and redeploying
added to targeted nodes in the cluster to support the performance of
key services.
This ability to provision services independently of one another, and
thereby scale their performance individually up and down as required, provides the greatest
flexibility in terms of handling changing business requirements and redeploying
existing resources to ensure continuously heightened efficiency.
182 changes: 182 additions & 0 deletions modules/learn/partials/cluster-example-diagrams.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// tag::five-cluster-setup[]
[plantuml]
.Couchbase Server Cluster for Development
----
@startuml

skinparam shadowing true
skinparam nodesep 10
skinparam ranksep 20

database "Node 1" as node1 {

component "Cluster\nManager" as cl1

component "Data\nService" as dl1

component "Index\nService" as ind1

component "Query\nService" as qry1

component "Search\nService" as ss1

}

cl1-[hidden]- dl1
dl1-[hidden]- ind1
ind1 -[hidden]- qry1
qry1 -[hidden]- ss1



database "Node 2" as node2 {

component "Cluster\nManager" as cl2

component "Data\nService" as dl2

component "Index\nService" as ind2

component "Query\nService" as qry2

component "Search\nService" as ss2

}

cl2-[hidden]- dl2
dl2-[hidden]- ind2
ind2 -[hidden]- qry2
qry2 -[hidden]- ss2




database "Node 3" as node3 {

component "Cluster\nManager" as cl3

component "Data\nService" as dl3

component "Index\nService" as ind3

component "Query\nService" as qry3

component "Search\nService" as ss3

}

cl3-[hidden]- dl3
dl3-[hidden]- ind3
ind3 -[hidden]- qry3
qry3 -[hidden]- ss3

database "Node 4" as node4 {

component "Cluster\nManager" as cl4

component "Data\nService" as dl4

component "Index\nService" as ind4

component "Query\nService" as qry4

component "Search\nService" as ss4

}

cl4-[hidden]- dl4
dl4-[hidden]- ind4
ind4 -[hidden]- qry4
qry4 -[hidden]- ss4


database "Node 5" as node5 {

component "Cluster\nManager" as cl5

component "Data\nService" as dl5

component "Index\nService" as ind5

component "Query\nService" as qry5

component "Search\nService" as ss5

}

cl5-[hidden]- dl5
dl5-[hidden]- ind5
ind5 -[hidden]- qry5
qry5 -[hidden]- ss5

@enduml
----
// end::five-cluster-setup[]


// tag::six-cluster-setup[]

[plantuml]
.Couchbase Server Cluster for Production
----
@startuml

skinparam shadowing true
skinparam nodesep 10
skinparam ranksep 20

database "Node 1" as node1 {

component "Cluster\nManager" as cl1

component "Data\nService" as dl1
}

database "Node 2" as node2 {

component "Cluster\nManager" as cl2

component "Data\nService" as dl2
}

database "Node 3" as node3 {

component "Cluster\nManager" as cl3

component "Data\nService" as dl3
}

database "Node 4" as node4 {

component "Cluster\nManager" as cl4

component "Index\nService" as ind1
}

database "Node 5" as node5 {

component "Cluster\nManager" as cl5

component "Index\nService" as ind2
}

database "Node 6" as node6 {

component "Cluster\nManager" as cl6

component "Query\nService" as qry1

component "Search\nService" as ss1
}

cl1 -[hidden]- dl1
cl2 -[hidden]- dl2
cl3 -[hidden]- dl3
cl4 -[hidden]- ind1
cl5 -[hidden]- ind2
cl6 -[hidden]- qry1
qry1 -[hidden]- ss1
@enduml
----

// end::six-cluster-setup[]