mirror of
https://github.com/rqlite/rqlite.git
synced 2022-10-30 02:37:32 +03:00
Update BULK.md
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Bulk API
|
||||
The bulk API allows multiple updates or queries to be executed in a single request. Both non-paramterized and parameterized requests are supported by the Bulk API. The API does not support mixing the parameterized and non-parameterized form in a single request.
|
||||
|
||||
A bulk update is contained within a single Raft log entry, so round-trips between nodes are at a minimum. This should result in much better throughput, if it is possible to use this kind of update. You can also ask rqlite to do the batching for you automatically, through the use of [_Queued Writes_](https://github.com/rqlite/rqlite/blob/master/DOC/QUEUED_WRITES.md). This relieves the client of doing any batching before transmitting a request to rqlite.
|
||||
|
||||
## Updates
|
||||
Bulk updates are supported. To execute multiple statements in one HTTP call, simply include the statements in the JSON array:
|
||||
|
||||
@@ -38,8 +40,6 @@ The response is of the form:
|
||||
"time": 0.869015
|
||||
}
|
||||
```
|
||||
A bulk update is contained within a single Raft log entry, so the network round-trips between nodes in the cluster are amortized over the bulk update. This should result in better throughput, if it is possible to use this kind of update.
|
||||
|
||||
### Atomicity
|
||||
Because a bulk operation is contained within a single Raft log entry, and only one Raft log entry is ever processed at one time, a bulk operation will never be interleaved with other requests.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user