Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GT server and GT client connection pools add support for QUIC, which is compatible with existing TCP protocols and implements certain intelligent switching policies #1

Closed
aospace-admin opened this issue Apr 27, 2023 · 6 comments
Labels

Comments

@aospace-admin
Copy link
Contributor

aospace-admin commented Apr 27, 2023

Description

The connection between GT server and GT client is currently based on the TCP protocol. In order to improve the performance in long distance, high latency and high packet loss scenarios (mainly multinational scenarios), it is necessary to add support for the QUIC protocol based connection method and to consider supporting the BBR congestion control algorithm; and to consider adding some intelligent switching strategies to improve the user experience.

Project output requirements

  • Design and implementation of additional connection methods that support the QUIC protocol, with support for BBR congestion control algorithms
  • Design and implement intelligent switching strategies for multiple connection methods in different scenarios to improve transmission efficiency
  • Write unit tests and integration tests
  • Write appropriate design and usage documentation
  • Code compliance with specifications: https://google.github.io/styleguide/go/, https://github.com/uber-go/guide

Project technical requirements

  • Familiarity with Golang, C/C++
  • Familiarity with QUIC protocol
  • Familiarity with BBR congestion control algorithm
  • Familiarity with TCP, UDP protocols
  • Familiarity with the use of multithreading
  • Knowledge of code optimization for high concurrency transmission scenarios

Open Source Summer Official Website

GT server 与 GT client 连接池增加支持 QUIC,与现有的的 TCP 协议实现兼容及实现智能切换策略

描述

目前 GT server 与 GT client 之间的连接是基于 TCP 协议实现的,为了提高在远距离,高延迟,高丢包率场景下的传输的表现(主要是跨国场景),增加支持基于 QUIC 协议的连接方式,需要考虑支持 BBR 拥塞控制算法;并可以考虑增加一定的智能切换策略,提高用户体验。

项目产出要求

  • 设计并实现增加支持基于 QUIC 协议的连接方式,需要支持 BBR 拥塞控制算法
  • 设计并实现多种连接方式在不同场景下,通过智能切换策略,提升传输效率
  • 编写相应的单元测试和集成测试
  • 编写相应的设计和使用文档
  • 代码符合规范: https://google.github.io/styleguide/go/、https://github.com/uber-go/guide

项目技术要求

  • 熟悉 Golang、C/C++
  • 熟悉 QUIC 协议
  • 熟悉 BBR 拥塞控制算法
  • 熟悉 TCP、UDP 协议
  • 熟悉使用多线程
  • 熟悉高并发传输场景下代码优化GT server 与 GT client 连接池增加支持 QUIC,与现有的的 TCP 协议实现兼容及实现智能切换策略

开源之夏官网

@aospace-admin aospace-admin added good first issue Good for newcomers Summer of Open Source 开源之夏 and removed good first issue Good for newcomers labels Apr 27, 2023
@DrakenLibra
Copy link
Contributor

开发日程(7.1-7.9)

1、本周进展

  • 阅读GT项目源码,主要关注了client/client.go和server/sever.go的启动流程和函数依赖关系;
  • 阅读论文《WiseTrans: Adaptive Transport Protocol Selection for Mobile Web Service》,关注QUIC和TCP在不同网络条件下的性能差异。

2、下周计划

  • 阅读并测试源码,找出并分析与“GT server 与 GT client 之间建立TCP连接”的相关函数;
  • 学习BBR拥塞控制算法。

Development schedule (7.1-7.9)

  1. This week's progress
  • Read the source code of the GT project, mainly focusing on the startup process and functional dependencies of client/client.go and server/sever.go;
  • Read the paper "WiseTrans: Adaptive Transport Protocol Selection for Mobile Web Service", pay attention to the performance difference between QUIC and TCP under different network conditions.
  1. Next week plan
  • Read and test the source code, find out and analyze the functions related to "establishing a TCP connection between GT server and GT client";
  • Learn BBR congestion control algorithm.

@DrakenLibra
Copy link
Contributor

开发日程(7.10-7.16)

1、本周进展

  • 梳理GT项目中与Client-Server之间构建连接池的代码,找出关键函数并分析逻辑。主要关注Client端的c.connectLoop()->connect()->initConn()->dialFn函数链,关注Server端的listen()->acceptLoop()->handle()->handleTunnel()函数链,以及MagicNumber在区分流量中的作用;
  • 学习BBR拥塞控制算法,阅读了提出BBR算法的论文“BBR:Congestion-Based Congestion Control”。使用iperf3在Linux中测试了不同条件下Cubic和BBR的吞吐量,BBR在长肥网络(带宽时延积大、丢包率高)具有显著效果。

2、下周计划

  • 调研各种QUIC协议的开源实现,对比并挑选最合适的QUIC项目;
  • 测试相关函数的作用,尝试将QUIC协议嵌入GT项目。

Development schedule (7.10-7.16)

  1. This week's progress
  • Comb through the code of GT project with Client-Server to build connection pool, find out the key functions and analyse the logic. Mainly focus on the c.connectLoop()->connect()->initConn()->dialFn function chain of the Client side, on the listen()->acceptLoop()->handle()->handleTunnel() function chain of the Server side, and the MagicNumber's role in differentiating traffic;
  • Learn about the BBR congestion control algorithm and reading the paper "BBR: Congestion-Based Congestion Control" that proposed the BBR algorithm. Test the throughput of Cubic and BBR under different conditions in Linux using iperf3. Find that BBR has a significant effect in long fat networks (large bandwidth delay product and high packet loss).
  1. Next week plan
  • Research various open-source implementations of the QUIC protocol, compare and select the most suitable QUIC project;
  • Test the role of related functions and try to embed the QUIC protocol into the GT project.

@DrakenLibra
Copy link
Contributor

开发日程(7.17-7.23)

1、本周进展

  • 调研各种QUIC的开源实现,主要关注quic-go(https://github.com/quic-go/quic-go ),msquic(https://github.com/microsoft/msquic )和quiche(https://github.com/google/quiche ),因为这三个quic项目一直保持高频率维护。quic-go仅支持cubic拥塞控制算法(issue里面提到似乎不准备添加bbr算法),msquic和quiche均支持bbr;
  • 尝试寻找关键函数,因为比较熟悉quic-go而且函数接口对应,所以目前尝试先使用quic-go让gt支持quic,后续视情况选择使用cgo替换为quiche/msquic,又或者自行为quic-go增加bbr支持。

2、下周计划

  • 尝试基于quic-go实现gt对quic的支持。

Development schedule (7.17-7.23)

  1. This week's progress
  • Investigate various open source implementations of QUIC, focusing on quic-go (https://github.com/quic-go/quic-go), msquic (https://github.com/microsoft/msquic) and quiche (https://github.com/google/quiche), because these three quic projects have maintained high-frequency maintenance. quic-go only supports the cubic congestion control algorithm (it seems that the bbr algorithm is not planned to be added in the issue), and both msquic and quiche support bbr;
  • Try to find the key functions, because I am familiar with quic-go and the function interface corresponds, so try to use quic-go first to make gt support quic, and then choose to use cgo to replace quiche/msquic according to the situation, or add bbr support for quic-go myself.
  1. Next week plan
  • Try to implement gt's support for quic based on quic-go.

@DrakenLibra
Copy link
Contributor

DrakenLibra commented Sep 11, 2023

开发日程(9.4-9.10)

1、本周进展

  • 尝试将QUIC嵌入gt。但是QUIC的IO读写接口全部实现在stream结构中,而TCP的IO接口是现在connection结构中,因此需要对GT中connection层进行大量修改,于9.5开会进行讨论。
  • 在clinet.go以及client/conn.go中为QUIC撰写对应的处理函数,在server.go以及server/conn.go中为QUIC撰写对应的处理函数。

2、下周计划

  • 扩展conn/conn.go中的Connection结构,对齐QUIC的接口。
  • 基于quic-go实现gt对QUIC的支持。

Development schedule (9.4-9.10)

  1. Progress this week
  • Try embedding QUIC into gt. However, QUIC's IO read and write interfaces are all implemented in the stream structure, while TCP's IO interface is now in the connection structure, so a lot of modifications to the connection layer in GT need to be made, and a meeting will be held on 9.5 for discussion.
  • Write corresponding processing functions for QUIC in clinet.go and client/conn.go, and write corresponding processing functions for QUIC in server.go and server/conn.go.
  1. Plan for next week
  • Extend the Connection structure in conn/conn.go and align it with the QUIC interface.
  • Based on quic-go, gt supports QUIC.

@DrakenLibra
Copy link
Contributor

开发日程(9.11-9.17)

1、本周进展

  • 基于QUIC实现QuicConnection结构,实现net.Conn接口,对齐conn/conn.go中的Connection结构需求,满足client/client.go中的函数处理需求。
  • 基于QUIC实现QuicListener结构,实现net.Listener接口,满足server/server.go中的函数处理需求。
  • 开会讨论后续进展计划。

2、下周计划

  • 完善client/config.go和server/config.go中对于QUIC相关参数的解析设置,完成gt对于QUIC的支持。
  • 完善QUIC相关的单元测试和集成测试,更新readme。
  • 尝试为QUIC增加BBR支持。

Development schedule (9.11-9.17)

  1. Progress this week
  • Implement the QuicConnection structure based on QUIC, implement the net.Conn interface, align the Connection structure requirements in conn/conn.go, and meet the function processing requirements in client/client.go.
  • Implement the QuicListener structure based on QUIC and implement the net.Listener interface to meet the function processing needs in server/server.go.
  • Meet to discuss follow-up progress plans.
  1. Plan for next week
  • Improve the parsing settings of QUIC related parameters in client/config.go and server/config.go, and complete gt's support for QUIC.
  • Improve QUIC-related unit tests and integration tests, and update the readme.
  • Try to add BBR support for QUIC.

@DrakenLibra
Copy link
Contributor

开发日程(9.18-9.24)

1、本周进展

  • 为GT的server与client之间的连接池增加支持 QUIC。
  • 尝试实现GT对于QUIC和TCP之间的智能切换。
  • 调研如何为GT的QUIC增加BBR的支持。

2、下周计划

  • 基于PR的沟通,完善GT对于QUIC的支持。
  • 实现GT对于QUIC和TCP的基本的智能切换。
  • 为GT的QUIC实现对于BBR的支持。

Development schedule (9.18-9.24)

  1. Progress this week
  • Add support for QUIC to the connection pool between GT's server and client.
  • Try to implement GT's intelligent switching between QUIC and TCP.
  • Investigate how to add BBR support to GT's QUIC.
  1. Plan for next week
  • Based on PR communication, improve GT’s support for QUIC.
  • Implement GT's basic intelligent switching between QUIC and TCP.
  • Implement support for BBR for GT's QUIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants