diff options
Diffstat (limited to 'docs/reference')
| -rw-r--r-- | docs/reference/configuration.md | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index b09b20f..a05aeee 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md | |||
| @@ -245,44 +245,38 @@ NGIT_RELAY_DATA_PATH=/mnt/ssd/relay-data | |||
| 245 | #### `NGIT_DATABASE_BACKEND` | 245 | #### `NGIT_DATABASE_BACKEND` |
| 246 | 246 | ||
| 247 | **Description:** Database backend type for storing Nostr events | 247 | **Description:** Database backend type for storing Nostr events |
| 248 | **Type:** String (enum: memory, nostrdb, lmdb) | 248 | **Type:** String (enum: memory, lmdb) |
| 249 | **Default:** `memory` | 249 | **Default:** `lmdb` |
| 250 | **Required:** No | 250 | **Required:** No |
| 251 | 251 | ||
| 252 | **Valid Values:** | 252 | **Valid Values:** |
| 253 | 253 | ||
| 254 | - `memory` - In-memory database (default, fastest, no persistence) | 254 | - `lmdb` - LMDB backend (persistent, general purpose) |
| 255 | - `nostrdb` - NostrDB backend (persistent, optimized for Nostr) [Not yet implemented] | 255 | - `memory` - In-memory database (fastest, no persistence) |
| 256 | - `lmdb` - LMDB backend (persistent, general purpose) [Not yet implemented] | ||
| 257 | 256 | ||
| 258 | **Examples:** | 257 | **Examples:** |
| 259 | 258 | ||
| 260 | ```bash | 259 | ```bash |
| 261 | # Development (default, no persistence) | 260 | # Production (default, persistent) |
| 262 | NGIT_DATABASE_BACKEND=memory | ||
| 263 | |||
| 264 | # Production with NostrDB (when implemented) | ||
| 265 | NGIT_DATABASE_BACKEND=nostrdb | ||
| 266 | |||
| 267 | # Production with LMDB (when implemented) | ||
| 268 | NGIT_DATABASE_BACKEND=lmdb | 261 | NGIT_DATABASE_BACKEND=lmdb |
| 262 | |||
| 263 | # Development/testing (no persistence) | ||
| 264 | NGIT_DATABASE_BACKEND=memory | ||
| 269 | ``` | 265 | ``` |
| 270 | 266 | ||
| 271 | **Comparison:** | 267 | **Comparison:** |
| 272 | 268 | ||
| 273 | | Backend | Persistence | Performance | Use Case | | 269 | | Backend | Persistence | Performance | Use Case | |
| 274 | | ------- | ----------- | ----------- | ---------------------------- | | 270 | | ------- | ----------- | ----------- | ---------------------------- | |
| 275 | | memory | No | Fastest | Development, testing | | ||
| 276 | | nostrdb | Yes | High | Production (Nostr-optimized) | | ||
| 277 | | lmdb | Yes | High | Production (general purpose) | | 271 | | lmdb | Yes | High | Production (general purpose) | |
| 272 | | memory | No | Fastest | Development, testing | | ||
| 278 | 273 | ||
| 279 | **Notes:** | 274 | **Notes:** |
| 280 | 275 | ||
| 281 | - `memory` backend loses all data on restart | 276 | - `memory` backend loses all data on restart |
| 282 | - NostrDB and LMDB backends will use `NGIT_RELAY_DATA_PATH` for storage | 277 | - `lmdb` backend uses `NGIT_RELAY_DATA_PATH` for storage |
| 283 | - NostrDB and LMDB are planned features, not yet available | ||
| 284 | - Default `memory` backend suitable for development and testing only | 278 | - Default `memory` backend suitable for development and testing only |
| 285 | - Production deployments should use persistent backends when available | 279 | - Production deployments should use `lmdb` |
| 286 | 280 | ||
| 287 | --- | 281 | --- |
| 288 | 282 | ||