mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-22 00:27:14 +00:00
config example updated
This commit is contained in:
parent
4920f61a99
commit
8050e2e74f
@ -1,22 +1,37 @@
|
|||||||
mongodb:
|
mongodb:
|
||||||
uri: "mongodb://localhost:27017/"
|
uri: "mongodb://localhost:27017/" # MongoDB connection URI
|
||||||
database: "grain"
|
database: "grain" # Database name
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: ":8080"
|
port: ":8080" # Port for the server to listen on
|
||||||
# Rate Limits Integers are per second
|
|
||||||
# burst is an override for the limit, this is to handle spikes in traffic
|
|
||||||
rate_limit:
|
rate_limit:
|
||||||
ws_limit: 50
|
event_limit: 25 # Global rate limit for events (25 events per second)
|
||||||
ws_burst: 100
|
event_burst: 50 # Global burst limit for events (allows a burst of 50 events)
|
||||||
event_limit: 25
|
ws_limit: 50 # Global rate limit for WebSocket messages (50 messages per second)
|
||||||
event_burst: 50
|
ws_burst: 100 # Global burst limit for WebSocket messages (allows a burst of 100 messages)
|
||||||
kind_limits:
|
|
||||||
|
kind_limits: # Specific rate limits for different kinds of events
|
||||||
- kind: 0
|
- kind: 0
|
||||||
limit: 1
|
limit: 1 # Rate limit for events of kind 0 (1 event per second)
|
||||||
burst: 5
|
burst: 5 # Burst limit for events of kind 0 (allows a burst of 5 events)
|
||||||
- kind: 1
|
- kind: 1
|
||||||
limit: 100
|
limit: 100 # Rate limit for events of kind 1 (100 events per second)
|
||||||
burst: 200
|
burst: 200 # Burst limit for events of kind 1 (allows a burst of 200 events)
|
||||||
- kind: 3
|
- kind: 3
|
||||||
limit: 25
|
limit: 25 # Rate limit for events of kind 3 (25 events per second)
|
||||||
burst: 50
|
burst: 50 # Burst limit for events of kind 3 (allows a burst of 50 events)
|
||||||
|
|
||||||
|
category_limits: # Rate limits based on event categories
|
||||||
|
regular:
|
||||||
|
limit: 50 # Rate limit for regular events (50 events per second)
|
||||||
|
burst: 100 # Burst limit for regular events (allows a burst of 100 events)
|
||||||
|
replaceable:
|
||||||
|
limit: 10 # Rate limit for replaceable events (10 events per second)
|
||||||
|
burst: 20 # Burst limit for replaceable events (allows a burst of 20 events)
|
||||||
|
parameterized_replaceable:
|
||||||
|
limit: 5 # Rate limit for parameterized replaceable events (5 events per second)
|
||||||
|
burst: 10 # Burst limit for parameterized replaceable events (allows a burst of 10 events)
|
||||||
|
ephemeral:
|
||||||
|
limit: 100 # Rate limit for ephemeral events (100 events per second)
|
||||||
|
burst: 200 # Burst limit for ephemeral events (allows a burst of 200 events)
|
||||||
|
Loading…
Reference in New Issue
Block a user