diff options
Diffstat (limited to 'docs/reference/configuration.md')
| -rw-r--r-- | docs/reference/configuration.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index a05aeee..bce1200 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md | |||
| @@ -997,15 +997,15 @@ Event blacklist does **not** affect NIP-11 metadata: | |||
| 997 | 997 | ||
| 998 | #### `NGIT_MAX_CONNECTIONS` | 998 | #### `NGIT_MAX_CONNECTIONS` |
| 999 | 999 | ||
| 1000 | **Description:** Maximum total connections to the relay. Prevents connection exhaustion DoS attacks. | 1000 | **Description:** Maximum total connections to the relay. When unset, connections are unlimited, deferring to OS fd limits and infrastructure-level controls. |
| 1001 | **Type:** Integer | 1001 | **Type:** Integer |
| 1002 | **Default:** `4096` | 1002 | **Default:** unlimited |
| 1003 | **Required:** No | 1003 | **Required:** No |
| 1004 | 1004 | ||
| 1005 | **Examples:** | 1005 | **Examples:** |
| 1006 | 1006 | ||
| 1007 | ```bash | 1007 | ```bash |
| 1008 | # Default: 4096 connections | 1008 | # Cap connections for a resource-constrained deployment |
| 1009 | NGIT_MAX_CONNECTIONS=4096 | 1009 | NGIT_MAX_CONNECTIONS=4096 |
| 1010 | 1010 | ||
| 1011 | # Higher limit for large public relay | 1011 | # Higher limit for large public relay |
| @@ -1017,8 +1017,8 @@ NGIT_MAX_CONNECTIONS=100 | |||
| 1017 | 1017 | ||
| 1018 | **Notes:** | 1018 | **Notes:** |
| 1019 | 1019 | ||
| 1020 | - Limits total concurrent WebSocket connections to the relay | 1020 | - When unset, the relay imposes no connection limit (`Semaphore::MAX_PERMITS`); OS fd limits and infrastructure controls apply |
| 1021 | - Prevents connection exhaustion attacks | 1021 | - Set this only if you need an explicit cap; otherwise leave unset |
| 1022 | - Works in conjunction with per-connection limits (500 subscriptions, 60 events/min) | 1022 | - Works in conjunction with per-connection limits (500 subscriptions, 60 events/min) |
| 1023 | - When limit is reached, new connections are rejected | 1023 | - When limit is reached, new connections are rejected |
| 1024 | - Existing connections continue to work normally | 1024 | - Existing connections continue to work normally |