Merge pull request #5861 from influxdata/docs/v3/no_sync-5826
Adding no_sync documentation to get-started page of Core and Enterprisepull/5870/head^2
commit
f4bb533e80
|
@ -329,8 +329,36 @@ For more information, see [diskless architecture](#diskless-architecture).
|
|||
> [!Note]
|
||||
> ##### Write requests return after WAL flush
|
||||
>
|
||||
> Because InfluxDB sends a write response after the WAL file has been flushed to the configured object store (default is every second), individual write requests might not complete quickly, but you can make many concurrent requests to achieve higher total throughput.
|
||||
> Future enhancements will include an API parameter that lets requests return without waiting for the WAL flush.
|
||||
> By default, InfluxDB acknowledges writes after flushing the WAL file to the Object store (occurring every second). For high throughput, you can send multiple concurrent write requests.
|
||||
>
|
||||
> To reduce the latency of writes, use the [`no_sync` write option](#no-sync-write-option), which acknowledges writes _before_ WAL persistence completes.
|
||||
|
||||
##### No sync write option
|
||||
|
||||
The `no_sync` write option reduces latency by acknowledging write requests before WAL persistence completes. When set to `true`, InfluxDB validates the data, writes the data to the WAL, and then immediately confirms the write, without waiting for persistence to the Object store.
|
||||
|
||||
Using `no_sync=true` is best when prioritizing high-throughput writes over absolute durability.
|
||||
|
||||
- Default behavior (`no_sync=false`): Waits for data to be written to the Object store before acknowledging the write. Reduces the risk of data loss, but increases the latency of the response.
|
||||
- With `no_sync=true`: Reduces write latency, but increases the risk of data loss in case of a crash before WAL persistence.
|
||||
|
||||
###### Immediate write using the HTTP API
|
||||
|
||||
The `no_sync` parameter controls when writes are acknowledged--for example:
|
||||
|
||||
|
||||
```sh
|
||||
curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \
|
||||
--data-raw "home,room=Sunroom temp=96"
|
||||
```
|
||||
|
||||
###### Immediate write using the influxdb3 CLI
|
||||
|
||||
The `no_sync` CLI option controls when writes are acknowledged--for example:
|
||||
|
||||
```sh
|
||||
influxdb3 write --bucket=mydb --org=my_org --token=my-token --no-sync
|
||||
```
|
||||
|
||||
#### Create a database or table
|
||||
|
||||
|
|
Loading…
Reference in New Issue