title | status | authors | approvers | creation-date | last-updated | |
---|---|---|---|---|---|---|
Quic Design |
implementable |
|
2019-05-01 |
2019-05-08 |
In order to enhance cloud and edge communication efficiency, we introduced the QUIC protocol for cloudhub and edgehub. It is suggested that cloudHub should support both websocket and QUIC protocol access at the same time. And the edgehub can choose one of the protocols to access to the cloudhub. QUIC is a new transport which reduces latency compared to that of TCP. On the surface, QUIC is very similar to TCP+TLS+HTTP/2 implemented on UDP. Because TCP is implemented in operating system kernels, and middlebox firmware, making significant changes to TCP is next to impossible. However, since QUIC is built on top of UDP, it suffers from no such limitations. Key features of QUIC:
- Dramatically reduced connection establishment time
- Improved congestion control
- Multiplexing without head of line blocking
- Forward error correction
- Connection migration
In edge scenarios, network connectivity could be unstable. With TCP + TLS, it becomes an overhead to establish / re-establish connections frequently due to intermittent networks. In such scenarios, QUIC with its zero RTT can help reduce this overhead and re-establish broken connections faster.
- User edit controller.yaml
cloudhub:
protocol_websocket: true # enable websocket protocol
port: 10000 # open port for websocket server
protocol_quic: false # enable quic protocol
quic_port: 10001 # open prot for quic server
max_incomingstreams: # the max incoming stream for quic server
address: 0.0.0.0
ca: /etc/kubeedge/ca/rootCA.crt
cert: /etc/kubeedge/certs/edge.crt
key: /etc/kubeedge/certs/edge.key
keepalive-interval: 30
write-timeout: 30
node-limit: 10
- Running the cloudhub, and start the websocket server.
- Waiting for client access through websocket protocol.
- User edit controller.yaml
cloudhub:
protocol_websocket: false # enable websocket protocol
port: 10000 # open port for websocket server
protocol_quic: true # enable quic protocol
quic_port: 10001 # open prot for quic server
max_incomingstreams: # the max incoming stream for quic server
address: 0.0.0.0
ca: /etc/kubeedge/ca/rootCA.crt
cert: /etc/kubeedge/certs/edge.crt
key: /etc/kubeedge/certs/edge.key
keepalive-interval: 30
write-timeout: 30
node-limit: 10
- Running the cloudhub, and start the quic server.
- Waiting for client access through quic protocol.
- User edit controller.yaml
cloudhub:
protocol_websocket: true # enable websocket protocol
port: 10000 # open port for websocket server
protocol_quic: true # enable quic protocol
quic_port: 10001 # open prot for quic server
max_incomingstreams: # the max incoming stream for quic server
address: 0.0.0.0
ca: /etc/kubeedge/ca/rootCA.crt
cert: /etc/kubeedge/certs/edge.crt
key: /etc/kubeedge/certs/edge.key
keepalive-interval: 30
write-timeout: 30
node-limit: 10
- Running the cloudhub, and start the quic and websocket server.
- Waiting for client access through quic and websocket protocol.
- User edit edge.yaml
websocket:
url: wss://0.0.0.0:10000/e632aba927ea4ac2b575ec1603d56f10/edge-node/events
certfile: /etc/kubeedge/certs/edge.crt
keyfile: /etc/kubeedge/certs/edge.key
handshake-timeout: 30 #second
write-deadline: 15 # second
read-deadline: 15 # second
controller:
protocol: websocket # websocket, quic
placement: false
heartbeat: 15 # second
refresh-ak-sk-interval: 10 # minute
auth-info-files-path: /var/IEF/secret
placement-url: https://x.x.x.x:7444/v1/placement_external/message_queue
project-id: e632aba927ea4ac2b575ec1603d56f10
node-id: edge-node
- Running the edgecore, and start to connect to cloudhub through websocket protocol.
- User edit edge.yaml
quic:
url: 127.0.0.1:10001
cafile: /etc/kubeedge/ca/rootCA.crt
certfile: /etc/kubeedge/certs/edge.crt
keyfile: /etc/kubeedge/certs/edge.key
handshake-timeout: 30 #second
write-deadline: 15 # second
read-deadline: 15 # second
controller:
protocol: quic # websocket, quic
placement: false
heartbeat: 15 # second
refresh-ak-sk-interval: 10 # minute
auth-info-files-path: /var/IEF/secret
placement-url: https://x.x.x.x:7444/v1/placement_external/message_queue
project-id: e632aba927ea4ac2b575ec1603d56f10
node-id: edge-node
- Run the edgecore, and start to connect to cloudhub through quic protocol.