From c9f0579dd7027b44693aa5c55826dbe362aacf01 Mon Sep 17 00:00:00 2001
From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Date: Tue, 1 Oct 2024 10:02:17 +0200
Subject: [PATCH 1/2] Addressing comments on the descritpion of DOS protection
configuration
---
docs/guides/nwaku/config-options.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/guides/nwaku/config-options.md b/docs/guides/nwaku/config-options.md
index dcad83c7..a2d451fe 100644
--- a/docs/guides/nwaku/config-options.md
+++ b/docs/guides/nwaku/config-options.md
@@ -157,11 +157,11 @@ Here are the available node configuration options, along with their default valu
| `websocket-secure-key-path` | | Secure websocket key path: '/path/to/key.txt' |
| `websocket-secure-cert-path` | | Secure websocket Certificate path: '/path/to/cert.txt' |
-## Non relay, request-response protocol DOS protection configuration
+## Non-relay, request-response protocol DOS protection configuration
| Name | Default Value | Description |
| ---------------------------- | ------------- | ------------------------------------------------------ |
-| `rate-limit` | | This is a repeatable option. Each one of them can describe spefic rate limit configuration for a particular protocol.
\:volume/period\
- if protocol is not given, settings will be taken as default for un-set protocols. Ex: `80/2s`
-Supported protocols are: `lightpush`\|`filter`\|`px`\|`store`\|`storev2`\|`storev3`
-volume must be an integer value, representing number of requests over the period of time allowed.
-period\ must be an integer with defined unit as one of `h`\|`m`\|`s`\|`ms`
- `storev2` and `storev3` takes precedence over `store` which can easy set both store protocols at once.
- In case of multiple set of the same protocol limit, last one will take place.
- if config is not set it means unlimited requests are allowed.
-filter has a bit different approach. It has a default setting applied if not overridden. Rate limit setting for filter will be applied per subscriber-peers, not globally - it must be considered when changing the setting.
Examples:
- `100/1s` - default for all protocols if not set otherwise.
-`lightpush:0/0s` - lightpush protocol will be not rate limited.
-`store:130/1500ms` - both store-v3 and store-v2 will apply 130 request per each 1500ms separately.
-`px:10/1h` PeerExchange will serve only 10 requests in every hour.
-`filter:8/5m` - will allow 8 subs/unsubs/ping requests for each subscribers within every 5 min. |
+| `rate-limit` | | This is a repeatable option. Each can describe a specific rate limit configuration for a particular protocol.
Formatted as:`:volume/period`
- if protocol is not given, settings will be taken as default for un-set protocols. Ex: `80/2s`
-Supported protocols are: `lightpush`\|`filter`\|`px`\|`store`\|`storev2`\|`storev3`
-volume must be an integer value, representing number of requests over the period of time allowed.
-period\ must be an integer with defined unit as one of `h`\|`m`\|`s`\|`ms`
- `storev2` and `storev3` takes precedence over `store` which can easy set both store protocols at once.
- In case of multiple set of the same protocol limit, last one will take place.
- if config is not set, - which is the default - means unlimited requests are allowed.
-filter has a bit different approach. It has a default setting applied if not overridden. Rate limit setting for filter will be applied per subscriber-peers, not globally - it must be considered when changing the setting.
Examples:
- `100/1s` - default for all protocols if not set otherwise.
-`lightpush:0/0s` - lightpush protocol will be not rate limited.
-`store:130/1500ms` - both store-v3 and store-v2 will apply 130 request per each 1500ms separately.
-`px:10/1h` PeerExchange will serve only 10 requests in every hour.
-`filter:8/5m` - will allow 8 subs/unsubs/ping requests for each subscribers within every 5 min. |
:::tip
To configure your node using the provided configuration options, have a look at the [Node Configuration Methods](/guides/nwaku/config-methods) guide.
From 14f2d536671d10a33b705cf0164f976beff2d5d1 Mon Sep 17 00:00:00 2001
From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
Date: Wed, 2 Oct 2024 13:44:24 +0200
Subject: [PATCH 2/2] Incorporate review suggestions
---
docs/guides/nwaku/config-options.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/guides/nwaku/config-options.md b/docs/guides/nwaku/config-options.md
index a2d451fe..0b3154b0 100644
--- a/docs/guides/nwaku/config-options.md
+++ b/docs/guides/nwaku/config-options.md
@@ -161,7 +161,7 @@ Here are the available node configuration options, along with their default valu
| Name | Default Value | Description |
| ---------------------------- | ------------- | ------------------------------------------------------ |
-| `rate-limit` | | This is a repeatable option. Each can describe a specific rate limit configuration for a particular protocol.
Formatted as:`:volume/period`
- if protocol is not given, settings will be taken as default for un-set protocols. Ex: `80/2s`
-Supported protocols are: `lightpush`\|`filter`\|`px`\|`store`\|`storev2`\|`storev3`
-volume must be an integer value, representing number of requests over the period of time allowed.
-period\ must be an integer with defined unit as one of `h`\|`m`\|`s`\|`ms`
- `storev2` and `storev3` takes precedence over `store` which can easy set both store protocols at once.
- In case of multiple set of the same protocol limit, last one will take place.
- if config is not set, - which is the default - means unlimited requests are allowed.
-filter has a bit different approach. It has a default setting applied if not overridden. Rate limit setting for filter will be applied per subscriber-peers, not globally - it must be considered when changing the setting.
Examples:
- `100/1s` - default for all protocols if not set otherwise.
-`lightpush:0/0s` - lightpush protocol will be not rate limited.
-`store:130/1500ms` - both store-v3 and store-v2 will apply 130 request per each 1500ms separately.
-`px:10/1h` PeerExchange will serve only 10 requests in every hour.
-`filter:8/5m` - will allow 8 subs/unsubs/ping requests for each subscribers within every 5 min. |
+| `rate-limit` | | This is a repeatable option. Each can describe a specific rate limit configuration for a particular protocol.
Formatted as:`:volume/period`
- if protocol is not given, settings will be taken as default for un-set protocols. Ex: `80/2s`
-Supported protocols are: `lightpush`\|`filter`\|`px`\|`store`\|`storev2`\|`storev3`
-volume must be an integer value, representing number of requests over the period of time allowed.
-period\ must be an integer with defined unit as one of `h`\|`m`\|`s`\|`ms`
- `storev2` and `storev3` takes precedence over `store` which can easy set both store protocols at once.
- In case of multiple set of the same protocol limit, last one will take place.
- if config is not set, - which is the default - means unlimited requests are allowed.
-filter has a bit different approach. It has a default setting applied if not overridden. Rate limit setting for filter will be applied per subscriber-peers, not globally - it must be considered when changing the setting.
Examples:
`--rate-limit="100/1s"` - default for all protocols if not set otherwise.
`--rate-limit="lightpush:0/0s"` - lightpush protocol will not be rate-limited.
`--rate-limit="store:130/1500ms"` - both store-v3 and store-v2 will apply 130 request per each 1500ms separately.
`--rate-limit="px:10/1h"` PeerExchange will serve only 10 requests every hour.
`--rate-limit="filter:8/5m"` - will allow 8 subs/unsubs/ping requests for each subscriber within every 5 min. |
:::tip
To configure your node using the provided configuration options, have a look at the [Node Configuration Methods](/guides/nwaku/config-methods) guide.