Skip to content

Commit 716bedc

Browse files
committed
Adding HTTP documentation for no_sync option
1 parent d6109b3 commit 716bedc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

content/shared/v3-core-get-started/_index.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,20 @@ InfluxDB provides a `no_sync` write option to allow faster response of write req
334334
- Default behavior(`no_sync=false`): Ensures data is persisted before acknowledging writes. Thus, reducing the risk of data loss.
335335
- With `no_sync=true`: Improves write performance but increases the risk of data loss in case of crashes before WAL persistence.
336336
337+
If you are using the HTTP API, here is an example of how to enable the `no_sync` option:
338+
339+
```sh
340+
curl -v "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \
341+
--data-raw "home,room=Sunroom temp=96
342+
home,room=Sunroom temp=hi"
343+
```
344+
337345
If you are using the CLI, here is an example of how to enable the `no_sync` option:
338346
339347
```sh
340-
influx write --bucket=mydb --org=my_org --token=my-token --no-sync
348+
influxdb3 write --bucket=mydb --org=my_org --token=my-token --no-sync
341349
```
350+
Using `no_sync=true` is best when prioritizing high-throughput writes over absolute durability.
342351
343352
#### Create a database or Table
344353

0 commit comments

Comments
 (0)