consul sidecars 是否支持上游的 websockets?
Does consul sidecars support websockets upstream?
是否可以在上游配置带有 websocket 的 consul agent sidecar?我尝试了以下配置,但它不起作用:
{
"bind_addr": "172.17.0.2",
"data_dir": "/consul/data",
"datacenter": "dc1",
"node_id" : "98dc3bf4-a364-46d9-8b72-624963064ab2",
"node_name": "socket-client-agent",
"leave_on_terminate": true,
"ports": [
{
"grpc": 8502
}
],
"server": false,
"service": [
{
"address": "172.17.0.3",
"connect": [
{
"sidecar_service": [
{
"checks": [
{
"interval": "10s",
"name": "socket-client-sidecar-proxy",
"tcp": "172.17.0.3:21000"
}
],
"port": 21000,
"proxy": [
{
"config": [
{
"bind_address": "0.0.0.0",
"bind_port": 21000,
"protocol": "tcp"
}
],
"upstreams": [
{
"destination_name": "sockets-server",
"local_bind_port": 5001,
"config": {
"protocol": "tcp"
}
}
]
}
]
}
]
}
],
"id": "socket-client-0",
"name": "socket-client",
"port": 5000
}
],
"ui_config": [
{
"enabled": false
}
]
}
从配置我试图连接到 sockets-server 使用 websockets 协议的服务。我正在使用 envoy 作为 sidecar 代理。
目前 Consul 没有正确配置 Envoy 来支持 WebSocket 升级。这个GitHub问题有更多关于这个问题的细节,以及潜在的修复——https://github.com/hashicorp/consul/issues/9473。
是否可以在上游配置带有 websocket 的 consul agent sidecar?我尝试了以下配置,但它不起作用:
{
"bind_addr": "172.17.0.2",
"data_dir": "/consul/data",
"datacenter": "dc1",
"node_id" : "98dc3bf4-a364-46d9-8b72-624963064ab2",
"node_name": "socket-client-agent",
"leave_on_terminate": true,
"ports": [
{
"grpc": 8502
}
],
"server": false,
"service": [
{
"address": "172.17.0.3",
"connect": [
{
"sidecar_service": [
{
"checks": [
{
"interval": "10s",
"name": "socket-client-sidecar-proxy",
"tcp": "172.17.0.3:21000"
}
],
"port": 21000,
"proxy": [
{
"config": [
{
"bind_address": "0.0.0.0",
"bind_port": 21000,
"protocol": "tcp"
}
],
"upstreams": [
{
"destination_name": "sockets-server",
"local_bind_port": 5001,
"config": {
"protocol": "tcp"
}
}
]
}
]
}
]
}
],
"id": "socket-client-0",
"name": "socket-client",
"port": 5000
}
],
"ui_config": [
{
"enabled": false
}
]
}
从配置我试图连接到 sockets-server 使用 websockets 协议的服务。我正在使用 envoy 作为 sidecar 代理。
目前 Consul 没有正确配置 Envoy 来支持 WebSocket 升级。这个GitHub问题有更多关于这个问题的细节,以及潜在的修复——https://github.com/hashicorp/consul/issues/9473。