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
2 changes: 1 addition & 1 deletion modules/ROOT/pages/actions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:*

Expand All @@ -31,4 +32,3 @@ There are several _actions_ that can be performed using the Cypher transaction H
* xref:actions/expired-transactions.adoc[]
* xref:actions/handling-errors.adoc[]
* xref:actions/handling-errors-in-an-open-transaction.adoc[]

25 changes: 25 additions & 0 deletions modules/ROOT/pages/actions/routing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
: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 link:https://neo4j.com/docs/operations-manual/current/clustering/internals/#clustering-routing[Server-side routing] has been enabled:

[options="header", cols="20m,80a"]
|===
| Server-side routing
| Support

|disabled
|Clusters support read-only queries.

|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.
|===