aboutsummaryrefslogtreecommitdiff
path: root/doc/book/reference-manual/k2v.md
diff options
context:
space:
mode:
authorMendes <mendes.oulamara@pm.me>2022-10-04 18:14:49 +0200
committerMendes <mendes.oulamara@pm.me>2022-10-04 18:14:49 +0200
commit829f815a897b04986559910bbcbf53625adcdf20 (patch)
tree6db3c27cff2aded754a641d1f2b05c83be701267 /doc/book/reference-manual/k2v.md
parent99f96b9564c9c841dc6c56f1255a6e70ff884d46 (diff)
parenta096ced35562bd0a8877a1ee2f755be1edafe343 (diff)
downloadgarage-829f815a897b04986559910bbcbf53625adcdf20.tar.gz
garage-829f815a897b04986559910bbcbf53625adcdf20.zip
Merge remote-tracking branch 'origin/main' into optimal-layout
Diffstat (limited to 'doc/book/reference-manual/k2v.md')
-rw-r--r--doc/book/reference-manual/k2v.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/book/reference-manual/k2v.md b/doc/book/reference-manual/k2v.md
new file mode 100644
index 00000000..207d056a
--- /dev/null
+++ b/doc/book/reference-manual/k2v.md
@@ -0,0 +1,58 @@
++++
+title = "K2V"
+weight = 70
++++
+
+Starting with version 0.7.2, Garage introduces an optionnal feature, K2V,
+which is an alternative storage API designed to help efficiently store
+many small values in buckets (in opposition to S3 which is more designed
+to store large blobs).
+
+K2V is currently disabled at compile time in all builds, as the
+specification is still subject to changes. To build a Garage version with
+K2V, the Cargo feature flag `k2v` must be activated. Special builds with
+the `k2v` feature flag enabled can be obtained from our download page under
+"Extra builds": such builds can be identified easily as their tag name ends
+with `-k2v` (example: `v0.7.2-k2v`).
+
+The specification of the K2V API can be found
+[here](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/k2v/doc/drafts/k2v-spec.md).
+This document also includes a high-level overview of K2V's design.
+
+The K2V API uses AWSv4 signatures for authentification, same as the S3 API.
+The AWS region used for signature calculation is always the same as the one
+defined for the S3 API in the config file.
+
+## Enabling and using K2V
+
+To enable K2V, download and run a build that has the `k2v` feature flag
+enabled, or produce one yourself. Then, add the following section to your
+configuration file:
+
+```toml
+[k2v_api]
+api_bind_addr = "<ip>:<port>"
+```
+
+Please select a port number that is not already in use by another API
+endpoint (S3 api, admin API) or by the RPC server.
+
+We provide an early-stage K2V client library for Rust which can be imported by adding the following to your `Cargo.toml` file:
+
+```toml
+k2v-client = { git = "https://git.deuxfleurs.fr/Deuxfleurs/garage.git" }
+```
+
+There is also a simple CLI utility which can be built from source in the
+following way:
+
+```sh
+git clone https://git.deuxfleurs.fr/Deuxfleurs/garage.git
+cd garage/src/k2v-client
+cargo build --features cli --bin k2v-cli
+```
+
+The CLI utility is self-documented, run `k2v-cli --help` to learn how to use
+it. There is also a short README.md in the `src/k2v-client` folder with some
+instructions.
+