From 27b27f902261ff090cc9bb3e0e578e617dbadd9f Mon Sep 17 00:00:00 2001 From: Gregory Woods Date: Tue, 2 Nov 2021 11:14:48 +0000 Subject: [PATCH 1/5] Add section on cluster routing capability --- modules/ROOT/pages/actions/index.adoc | 1 + modules/ROOT/pages/actions/routing.adoc | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 modules/ROOT/pages/actions/routing.adoc diff --git a/modules/ROOT/pages/actions/index.adoc b/modules/ROOT/pages/actions/index.adoc index 24cf4b5..da3d316 100644 --- a/modules/ROOT/pages/actions/index.adoc +++ b/modules/ROOT/pages/actions/index.adoc @@ -10,6 +10,7 @@ There are several _actions_ that can be performed using the Cypher transaction H * xref:actions/transaction-flow.adoc[] * xref:actions/query-format.adoc[] * xref:actions/result-format.adoc[] +* xref:actions/routing.adoc[] *Using the API:* diff --git a/modules/ROOT/pages/actions/routing.adoc b/modules/ROOT/pages/actions/routing.adoc new file mode 100644 index 0000000..c88783b --- /dev/null +++ b/modules/ROOT/pages/actions/routing.adoc @@ -0,0 +1,16 @@ +:description: HTTP API Routing. + +[[http-api-actions-cluster-routing]] += Clusters and Routing + +The Cypher Transactional API provides a limited level of support for query routing. The level of support depends on whether Server-side Routing has been enabled. See (`dbms.routing.enabled=true` [link to https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing)]. + +== Server-side Routing Disabled + +Clusters support read-only queries. + +== Server-side Routing Enabled + +Clusters support routing for queries that involve a xref::/actions/begin-and-commit-a-transaction-in-one-request.adoc[single request] (i.e. via the `tx/commit` endpoint). This is because the cluster does not currently support transaction identifiers across the cluster. + +In this context, all queries are considered `WRITE` queries even if they contain no cypher with write operations. Since the HTTP API did not previously support marking queries as `READ` or `WRITE`, the server assumes all queries are `WRITE` queries to support all cases. The effect of this is that all queries are ultimately executed on the leader. \ No newline at end of file From 4a9844a70d9d36e69b5fdc4b8fa6e010b3de3217 Mon Sep 17 00:00:00 2001 From: Gregory Woods Date: Tue, 2 Nov 2021 11:26:41 +0000 Subject: [PATCH 2/5] Add link to ops manual --- modules/ROOT/pages/actions/routing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/actions/routing.adoc b/modules/ROOT/pages/actions/routing.adoc index c88783b..2a85ae5 100644 --- a/modules/ROOT/pages/actions/routing.adoc +++ b/modules/ROOT/pages/actions/routing.adoc @@ -3,7 +3,7 @@ [[http-api-actions-cluster-routing]] = Clusters and Routing -The Cypher Transactional API provides a limited level of support for query routing. The level of support depends on whether Server-side Routing has been enabled. See (`dbms.routing.enabled=true` [link to https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing)]. +The Cypher Transactional API provides a limited level of support for query routing. The level of support depends on whether xref:4.4-preview@operations-manual:ROOT:clustering/internals.adoc#causal-clustering-routing[Server-side Routing] has been enabled. == Server-side Routing Disabled From b35660ff96437609bad19e2ae86201d11cdf4bb7 Mon Sep 17 00:00:00 2001 From: Gregory Woods Date: Tue, 2 Nov 2021 11:28:47 +0000 Subject: [PATCH 3/5] Formatting --- modules/ROOT/pages/actions/routing.adoc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/actions/routing.adoc b/modules/ROOT/pages/actions/routing.adoc index 2a85ae5..1fe714b 100644 --- a/modules/ROOT/pages/actions/routing.adoc +++ b/modules/ROOT/pages/actions/routing.adoc @@ -3,7 +3,8 @@ [[http-api-actions-cluster-routing]] = Clusters and Routing -The Cypher Transactional API provides a limited level of support for query routing. The level of support depends on whether xref:4.4-preview@operations-manual:ROOT:clustering/internals.adoc#causal-clustering-routing[Server-side Routing] has been enabled. +The Cypher Transactional API provides a limited level of support for query routing. +The level of support depends on whether xref:4.4-preview@operations-manual:ROOT:clustering/internals.adoc#causal-clustering-routing[Server-side Routing] has been enabled. == Server-side Routing Disabled @@ -11,6 +12,9 @@ Clusters support read-only queries. == Server-side Routing Enabled -Clusters support routing for queries that involve a xref::/actions/begin-and-commit-a-transaction-in-one-request.adoc[single request] (i.e. via the `tx/commit` endpoint). This is because the cluster does not currently support transaction identifiers across the cluster. +Clusters support routing for queries that involve a xref::/actions/begin-and-commit-a-transaction-in-one-request.adoc[single request] (i.e. via the `tx/commit` endpoint). +This is because the cluster does not currently support transaction identifiers across the cluster. -In this context, all queries are considered `WRITE` queries even if they contain no cypher with write operations. Since the HTTP API did not previously support marking queries as `READ` or `WRITE`, the server assumes all queries are `WRITE` queries to support all cases. The effect of this is that all queries are ultimately executed on the leader. \ No newline at end of file +In this context, all queries are considered `WRITE` queries even if they contain no cypher with write operations. +Since the HTTP API did not previously support marking queries as `READ` or `WRITE`, the server assumes all queries are `WRITE` queries to support all cases. +The effect of this is that all queries are ultimately executed on the leader. \ No newline at end of file From 08ff4ab19c83cbee858654f895cdd856fa413090 Mon Sep 17 00:00:00 2001 From: gjmwoods <42248895+gjmwoods@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:09:21 +0000 Subject: [PATCH 4/5] Update modules/ROOT/pages/actions/routing.adoc Co-authored-by: AlexicaWright <49636617+AlexicaWright@users.noreply.github.com> --- modules/ROOT/pages/actions/routing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/actions/routing.adoc b/modules/ROOT/pages/actions/routing.adoc index 1fe714b..c998393 100644 --- a/modules/ROOT/pages/actions/routing.adoc +++ b/modules/ROOT/pages/actions/routing.adoc @@ -4,7 +4,7 @@ = Clusters and Routing The Cypher Transactional API provides a limited level of support for query routing. -The level of support depends on whether xref:4.4-preview@operations-manual:ROOT:clustering/internals.adoc#causal-clustering-routing[Server-side Routing] has been enabled. +The level of support depends on whether link:https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing[Server-side Routing] has been enabled. == Server-side Routing Disabled From 3145adc14e5272717dfcefffe286452cebef4da0 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Thu, 11 Nov 2021 16:18:41 +0000 Subject: [PATCH 5/5] Editorial update to remove title case and add table --- modules/ROOT/pages/actions/routing.adoc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/modules/ROOT/pages/actions/routing.adoc b/modules/ROOT/pages/actions/routing.adoc index c998393..1201236 100644 --- a/modules/ROOT/pages/actions/routing.adoc +++ b/modules/ROOT/pages/actions/routing.adoc @@ -1,20 +1,25 @@ -:description: HTTP API Routing. +:description: HTTP API routing. [[http-api-actions-cluster-routing]] -= Clusters and Routing += Clusters and routing The Cypher Transactional API provides a limited level of support for query routing. -The level of support depends on whether link:https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing[Server-side Routing] has been enabled. -== Server-side Routing Disabled +The level of support depends on whether link:https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing[Server-side routing] has been enabled: -Clusters support read-only queries. +[options="header", cols="20m,80a"] +|=== +| Server-side routing +| Support -== Server-side Routing Enabled +|disabled +|Clusters support read-only queries. -Clusters support routing for queries that involve a xref::/actions/begin-and-commit-a-transaction-in-one-request.adoc[single request] (i.e. via the `tx/commit` endpoint). +|enabled +|Clusters support routing for queries that involve a xref::/actions/begin-and-commit-a-transaction-in-one-request.adoc[single request] (i.e. via the `tx/commit` endpoint). This is because the cluster does not currently support transaction identifiers across the cluster. -In this context, all queries are considered `WRITE` queries even if they contain no cypher with write operations. +In this context, all queries are considered `WRITE` queries, even if they contain no cypher with write operations. Since the HTTP API did not previously support marking queries as `READ` or `WRITE`, the server assumes all queries are `WRITE` queries to support all cases. -The effect of this is that all queries are ultimately executed on the leader. \ No newline at end of file +The effect of this is that all queries are ultimately executed on the leader. +|===