summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2022-10-23 22:52:22 +0200
committerValery Piashchynski <[email protected]>2022-10-23 22:52:22 +0200
commit3e7be12359d6aa37163e278b0c756e0883d0ebdf (patch)
treedd2269c32f473ed143d2fb31213f425f56b5b4ad
parentc923e64c815cb69c6b9e408a78cfebfdf7dce5ea (diff)
chore: remove broadcast and websockets from the configuration
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r--.rr.yaml83
-rw-r--r--schemas/config/2.0.schema.json64
2 files changed, 3 insertions, 144 deletions
diff --git a/.rr.yaml b/.rr.yaml
index 80431327..c5900e91 100644
--- a/.rr.yaml
+++ b/.rr.yaml
@@ -549,7 +549,7 @@ http:
# Optional, default: false
raw_body: false
- # Middlewares for the http plugin, order is important. Allowed values is: "headers", "gzip", "static", "websockets", "sendfile", [SINCE 2.6] -> "new_relic", [SINCE 2.6] -> "http_metrics", [SINCE 2.7] -> "cache"
+ # Middlewares for the http plugin, order is important. Allowed values is: "headers", "gzip", "static", "sendfile", [SINCE 2.6] -> "new_relic", [SINCE 2.6] -> "http_metrics", [SINCE 2.7] -> "cache"
#
# Default value: []
middleware: [ "headers", "gzip" ]
@@ -961,7 +961,7 @@ http:
# Default: 128
max_concurrent_streams: 128
-# Redis section. Should be defined to use as a broadcast driver for the websockets (with no limitation to use in other plugins)
+# Redis section.
redis:
# UniversalClient is an abstract client which - based on the provided options -
# can connect to either clusters, or sentinel-backed failover instances
@@ -993,85 +993,6 @@ redis:
idle_check_freq: 0 # accepted values [1s, 5m, 3h]
read_only: false
-# Websockets plugin
-#
-# Should be attached as a middleware to the http plugin middlewares
-websockets:
- # Broker to use. Brokers can be set in the broadcast plugin. For example, if you use broker: default here, broadcast plugin should have default broker in its config.
- #
- # This option is required.
- broker: default-redis
-
- # Allowed request origin (single value). This option is optional (allowed all by default)
- #
- # Default: "*". Samples: "https://*.my.site", "http//*.com", "10.1.1.1", etc
- allowed_origin: "*"
-
- # http path where to handle websockets connections
- #
- # Default: /ws
- path: "/ws"
-
-# Broadcast plugin. It main purpose is to broadcast published messages via all brokers
-#
-# Use it in conjunction with the websockets, memory and redis plugins.
-# LIMITATION: DO NOT use the same redis connection within different sections or messages will be duplicated.
-# There is no limitation to use different redis connections (ie localhost:6379, localhost:6378, etc) in different sections.
-broadcast:
- # Section name.
- #
- # This option is required and should match with other plugins broker section.
- default:
- # Driver to use. Available drivers: redis, memory. In-memory driver does not require any configuration.
- #
- # This option is required. There is no config for this driver for the broadcast, thus we need to use {}
- driver: memory
- # This option is required if you want to use local configuration
- #
- # Default: empty.
- config: { }
-
- # Section name.
- #
- # This option is required and should match with other plugins broker section.
- default-redis:
- # Driver to use. Available drivers: redis, memory. Redis driver require configuration (if empty - localhost:6379 one-node client will be used, see redis plugin config).
- #
- # This option is required.
- driver: redis
- # Local configuration section
- #
- # This option is required to use local section, otherwise (default-redis) global configuration will be used.
- config:
- # Redis configuration. This configuration related to the default-redis section. Broadcast plugin will use this configuration first.
- # If section configuration doesn't exists, second priority - global redis configuration.
- # If there are no configurations provided, default will be used.
- #
- # Default: localhost:6379
- addrs:
- - "localhost:6379"
- # if a MasterName is passed a sentinel-backed FailoverClient will be returned
- master_name: ""
- username: ""
- password: ""
- db: 0
- sentinel_password: ""
- route_by_latency: false
- route_randomly: false
- dial_timeout: 0 # accepted values [1s, 5m, 3h]
- max_retries: 1
- min_retry_backoff: 0 # accepted values [1s, 5m, 3h]
- max_retry_backoff: 0 # accepted values [1s, 5m, 3h]
- pool_size: 0
- min_idle_conns: 0
- max_conn_age: 0 # accepted values [1s, 5m, 3h]
- read_timeout: 0 # accepted values [1s, 5m, 3h]
- write_timeout: 0 # accepted values [1s, 5m, 3h]
- pool_timeout: 0 # accepted values [1s, 5m, 3h]
- idle_timeout: 0 # accepted values [1s, 5m, 3h]
- idle_check_freq: 0 # accepted values [1s, 5m, 3h]
- read_only: false
-
# Application metrics in Prometheus format (docs: https://roadrunner.dev/docs/plugins-metrics/2.x/en). Drop this section
# for this feature disabling.
metrics:
diff --git a/schemas/config/2.0.schema.json b/schemas/config/2.0.schema.json
index df28442e..15428c84 100644
--- a/schemas/config/2.0.schema.json
+++ b/schemas/config/2.0.schema.json
@@ -440,7 +440,6 @@
"headers",
"gzip",
"static",
- "websockets",
"sendfile",
"http_metrics",
"cache",
@@ -1080,71 +1079,10 @@
]
},
"redis": {
- "description": "Redis section. Should be defined to use as a broadcast driver for the websockets (with no limitation to use in other plugins).",
+ "description": "Redis section.",
"type": "object",
"$ref": "#/definitions/Redis"
},
- "websockets": {
- "description": "Websockets plugin, HTTP middleware",
- "type": "object",
- "properties": {
- "broker": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9._-]+$",
- "description": "Broker to use. Brokers can be set in the broadcast plugin. For example, if you use broker: default here, broadcast plugin should have default broker in its config."
- },
- "allowed_origin": {
- "type": "string",
- "description": " Allowed request origin (single value). This option is optional (allowed all by default)",
- "default": "*"
- },
- "path": {
- "type": "string",
- "description": "http path where to handle websockets connections",
- "default": "/ws"
- }
- }
- },
- "broadcast": {
- "description": " Broadcast plugin. It main purpose is to broadcast published messages via all brokers. Use it in conjunction with the websockets, memory and redis plugins. LIMITATION: DO NOT use the same redis connection within different sections or messages will be duplicated. There is no limitation to use different redis connections (ie localhost:6379, localhost:6378, etc) in different sections.",
- "type": "object",
- "minProperties": 1,
- "patternProperties": {
- "^[a-zA-Z0-9._-]+$": {
- "description": "Driver configuration sections",
- "type": "object",
- "properties": {
- "driver": {
- "description": "Driver to use. Available drivers: redis, memory. In-memory driver does not require any configuration.",
- "type": "string",
- "enum": [
- "memory",
- "redis"
- ]
- },
- "config": {
- "description": "Driver configuration",
- "type": "object",
- "allOf": [
- {
- "description": "In-memory configuration",
- "type": "object",
- "properties": {}
- },
- {
- "type": "object",
- "$ref": "#/definitions/Redis"
- }
- ]
- }
- },
- "required": [
- "driver",
- "config"
- ]
- }
- }
- },
"metrics": {
"description": "Application metrics in Prometheus format (docs: https://roadrunner.dev/docs/beep-beep-metrics)",
"type": "object",