1 ##
2 ## Default strfry config
3 ##
4 5 # Directory that contains the strfry LMDB database (restart required)
6 db = "/data/strfry-db"
7 8 dbParams {
9 # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required)
10 maxreaders = 256
11 12 # Size of mmap to use when loading LMDB (default is 1TB, which is probably reasonable) (restart required)
13 mapsize = 1099511627776
14 }
15 16 relay {
17 # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required)
18 bind = "0.0.0.0"
19 20 # Port to open for the nostr websocket protocol (restart required)
21 port = 8080
22 23 # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required)
24 nofiles = 1000000
25 26 # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case)
27 realIpHeader = ""
28 29 info {
30 # NIP-11: Name of this server. Short/descriptive (< 30 characters)
31 name = "strfry benchmark"
32 33 # NIP-11: Detailed description of this server, free-form
34 description = "A strfry relay for benchmarking"
35 36 # NIP-11: Administrative pubkey, for contact purposes
37 pubkey = ""
38 39 # NIP-11: Alternative contact for this server
40 contact = ""
41 }
42 43 # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required)
44 maxWebsocketPayloadSize = 104857600
45 46 # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
47 autoPingSeconds = 55
48 49 # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) (restart required)
50 enableTcpKeepalive = false
51 52 # How much uninterrupted CPU time a REQ query should get during its DB scan
53 queryTimesliceBudgetMicroseconds = 10000
54 55 # Maximum records that can be returned per filter
56 maxFilterLimit = 500
57 58 # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time
59 maxSubsPerConnection = 20
60 61 writePolicy {
62 # If non-empty, path to an executable script that implements the writePolicy plugin logic
63 plugin = ""
64 }
65 66 compression {
67 # Use permessage-deflate compression if supported by client. Reduces bandwidth, but uses more CPU (restart required)
68 enabled = true
69 70 # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required)
71 slidingWindow = true
72 }
73 74 logging {
75 # Dump all incoming messages
76 dumpInAll = false
77 78 # Dump all incoming EVENT messages
79 dumpInEvents = false
80 81 # Dump all incoming REQ/CLOSE messages
82 dumpInReqs = false
83 84 # Log performance metrics for initial REQ database scans
85 dbScanPerf = false
86 }
87 88 numThreads {
89 # Ingester threads: route incoming requests, validate events/sigs (restart required)
90 ingester = 3
91 92 # reqWorker threads: Handle initial DB scan for events (restart required)
93 reqWorker = 3
94 95 # reqMonitor threads: Handle filtering of new events (restart required)
96 reqMonitor = 3
97 98 # yesstr threads: experimental yesstr protocol (restart required)
99 yesstr = 1
100 }
101 }
102