more descriptive default config

This commit is contained in:
Doug Hoyte
2023-01-13 16:14:11 -05:00
parent a5c4df16f3
commit a9c69bd7c1
3 changed files with 110 additions and 20 deletions

2
golpe

Submodule golpe updated: 72a016041f...e39dcdc7ed

View File

@ -54,25 +54,50 @@ tables:
config: config:
- name: db - name: db
desc: "Directory that contains strfry database"
default: "./strfry-db/" default: "./strfry-db/"
noReload: true noReload: true
- name: relay__port
default: 7777
noReload: true
- name: relay__bind - name: relay__bind
desc: "Interface to listen on. Use 0.0.0.0 to listen on all interfaces"
default: "127.0.0.1" default: "127.0.0.1"
noReload: true noReload: true
- name: relay__port
desc: "Port to open for the nostr websocket protocol"
default: 7777
noReload: true
- name: relay__info__name - name: relay__info__name
desc: "NIP-11: Name of this server. Short/descriptive (< 30 characters)"
default: "strfry default" default: "strfry default"
- name: relay__info__description - name: relay__info__description
desc: "NIP-11: Detailed information about relay, free-form"
default: "This is a strfry instance." default: "This is a strfry instance."
- name: relay__info__pubkey - name: relay__info__pubkey
desc: "NIP-11: Administrative nostr pubkey, for contact purposes"
default: "unset" default: "unset"
- name: relay__info__contact - name: relay__info__contact
desc: "NIP-11: Alternative administrative contact (email, website, etc)"
default: "unset" default: "unset"
- name: relay__maxWebsocketPayloadSize
desc: "Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg)"
default: 131072
noReload: true
- name: relay__autoPingSeconds
desc: "Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts)"
default: 55
noReload: true
- name: relay__enableTcpKeepalive
desc: "If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy)"
default: false
- name: relay__queryTimesliceBudgetMicroseconds
desc: "How much uninterrupted CPU time a REQ query should get during its DB scan"
default: 10000
- name: relay__maxFilterLimit
desc: "Maximum records that can be returned per filter"
default: 500
- name: relay__numThreads__ingester - name: relay__numThreads__ingester
default: 3 default: 3
noReload: true noReload: true
@ -86,30 +111,24 @@ config:
default: 1 default: 1
noReload: true noReload: true
- name: relay__maxWebsocketPayloadSize - name: events__maxEventSize
default: 131072 desc: "Maximum size of normalised JSON, in bytes"
noReload: true default: 65536
- name: relay__autoPingSeconds
default: 55
noReload: true
- name: relay__enableTcpKeepalive
default: false
- name: relay__queryTimesliceBudgetMicroseconds
default: 10000
- name: relay__maxFilterLimit
default: 500
- name: events__rejectEventsNewerThanSeconds - name: events__rejectEventsNewerThanSeconds
desc: "Events newer than this will be rejected"
default: 900 # 15 mins default: 900 # 15 mins
- name: events__rejectEventsOlderThanSeconds - name: events__rejectEventsOlderThanSeconds
default: 604800 # 1 week desc: "Events older than this will be rejected"
default: 94608000 # 3 years
- name: events__rejectEphemeralEventsOlderThanSeconds - name: events__rejectEphemeralEventsOlderThanSeconds
desc: "Ephemeral events older than this will be rejected"
default: 60 default: 60
- name: events__ephemeralEventsLifetimeSeconds - name: events__ephemeralEventsLifetimeSeconds
desc: "Ephemeral events will be deleted from the DB when older than this"
default: 300 default: 300
- name: events__maxEventSize
default: 65536
- name: events__maxNumTags - name: events__maxNumTags
desc: "Maximum number of tags allowed"
default: 250 default: 250
- name: events__maxTagValSize - name: events__maxTagValSize
desc: "Maximum size for tag values, in bytes"
default: 128 default: 128

View File

@ -1,5 +1,76 @@
##
## Default strfry config
##
# Directory that contains strfry database
db = "./strfry-db/" db = "./strfry-db/"
relay { relay {
# Interface to listen on. Use 0.0.0.0 to listen on all interfaces
bind = "127.0.0.1"
# Port to open for the nostr websocket protocol
port = 7777 port = 7777
info {
# NIP-11: Name of this server. Short/descriptive (< 30 characters)
name = "strfry default"
# NIP-11: Detailed information about relay, free-form
description = "This is a strfry instance."
# NIP-11: Administrative nostr pubkey, for contact purposes
pubkey = "unset"
# NIP-11: Alternative administrative contact (email, website, etc)
contact = "unset"
}
# Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg)
maxWebsocketPayloadSize = 131072
# Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts)
autoPingSeconds = 55
# If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy)
enableTcpKeepalive = false
# How much uninterrupted CPU time a REQ query should get during its DB scan
queryTimesliceBudgetMicroseconds = 10000
# Maximum records that can be returned per filter
maxFilterLimit = 500
numThreads {
ingester = 3
reqWorker = 3
reqMonitor = 3
yesstr = 1
}
}
events {
# Maximum size of normalised JSON, in bytes
maxEventSize = 65536
# Events newer than this will be rejected
rejectEventsNewerThanSeconds = 900
# Events older than this will be rejected
rejectEventsOlderThanSeconds = 94608000
# Ephemeral events older than this will be rejected
rejectEphemeralEventsOlderThanSeconds = 60
# Ephemeral events will be deleted from the DB when older than this
ephemeralEventsLifetimeSeconds = 300
# Maximum number of tags allowed
maxNumTags = 250
# Maximum size for tag values, in bytes
maxTagValSize = 128
} }