Skip to content

feat(triple): add server http3 quic config helper#3299

Open
CAICAIIs wants to merge 7 commits into
apache:developfrom
CAICAIIs:http3
Open

feat(triple): add server http3 quic config helper#3299
CAICAIIs wants to merge 7 commits into
apache:developfrom
CAICAIIs:http3

Conversation

@CAICAIIs
Copy link
Copy Markdown
Contributor

@CAICAIIs CAICAIIs commented Apr 18, 2026

Summary

This PR implements PR1 of #3102 as a minimal MVP for server-side HTTP/3 QUIC config infrastructure.

It adds 4 HTTP/3 config fields to global.Http3Config, introduces a shared helper to map them into quic.Config, and wires that helper into Triple server startup.

Included

  • add:
    • keep-alive-period
    • max-idle-timeout
    • max-incoming-streams
    • max-incoming-uni-streams
  • add shared Http3Config -> quic.Config helper
  • wire helper into:
    • startHttp3
    • startHttp2AndHttp3
  • add targeted tests

Checklist

  • I confirm the target branch is develop
  • Code has passed local testing
  • I have added tests that prove my fix is effective or that my feature works

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 18, 2026

Codecov Report

❌ Patch coverage is 88.17204% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.27%. Comparing base (60d1c2a) to head (db6acbc).
⚠️ Report is 777 commits behind head on develop.

Files with missing lines Patch % Lines
global/http3_config.go 89.83% 3 Missing and 3 partials ⚠️
protocol/triple/triple_protocol/server.go 80.00% 3 Missing ⚠️
protocol/triple/triple_protocol/http3_config.go 89.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3299      +/-   ##
===========================================
+ Coverage    46.76%   51.27%   +4.50%     
===========================================
  Files          295      486     +191     
  Lines        17172    36403   +19231     
===========================================
+ Hits          8031    18665   +10634     
- Misses        8287    16238    +7951     
- Partials       854     1500     +646     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds minimal server-side HTTP/3 (QUIC) configuration support by extending global.Http3Config, introducing a helper to translate those settings into quic.Config, and wiring it into Triple server startup paths, with targeted unit tests.

Changes:

  • Extended global.Http3Config with QUIC tuning fields (keep-alive period, idle timeout, incoming stream limits).
  • Added newQUICConfig helper to map Http3Configquic.Config (with duration parsing + errors).
  • Wired QUIC config helper into startHttp3 / startHttp2AndHttp3 and added tests for mapping + error propagation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
global/http3_config.go Adds new HTTP/3/QUIC config fields, defaults, and clone behavior.
global/config_test.go Expands clone/default tests to cover the new HTTP/3 fields.
protocol/triple/triple_protocol/http3_config.go Introduces newQUICConfig helper that parses and maps config into quic.Config.
protocol/triple/triple_protocol/server.go Uses newQUICConfig in HTTP/3 startup paths instead of an empty QUIC config.
protocol/triple/triple_protocol/server_test.go Adds unit tests for mapping and for startup paths returning parse errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread global/http3_config.go Outdated
Comment thread global/http3_config.go Outdated
@Alanxtl
Copy link
Copy Markdown
Contributor

Alanxtl commented Apr 20, 2026

面向用户的api是不是还没暴露出去

@CAICAIIs
Copy link
Copy Markdown
Contributor Author

面向用户的api是不是还没暴露出去

分层做:PR1 先暴露配置入口并打通 server 侧实现,暂时没有新增 triple.WithXXX(...) 这类 option API,后续再补更完整的面向用户代码级入口。如果说的是 YAML/JSON / global.TripleConfig.Http3 这种已经暴露了

@CAICAIIs
Copy link
Copy Markdown
Contributor Author

这个pr下个版本再考虑吧

@sonarqubecloud
Copy link
Copy Markdown

@Alanxtl
Copy link
Copy Markdown
Contributor

Alanxtl commented Apr 20, 2026

面向用户的api是不是还没暴露出去

分层做:PR1 先暴露配置入口并打通 server 侧实现,暂时没有新增 triple.WithXXX(...) 这类 option API,后续再补更完整的面向用户代码级入口。如果说的是 YAML/JSON / global.TripleConfig.Http3 这种已经暴露了

YAML已经暴露了?我看先应该是只支持global不支持config的吧,通过yaml配置不是走的config吗

@Alanxtl Alanxtl added 3.3.3 version 3.3.3 and removed 3.3.2 version 3.3.2 labels Apr 20, 2026
@CAICAIIs
Copy link
Copy Markdown
Contributor Author

YAML已经暴露了?我看先应该是只支持global不支持config的吧,通过yaml配置不是走的config吗

确实说法不准确,按 develop 现在的实现看,这 4 个新字段目前只在 global/runtime 侧生效,而本地 YAML 这条链路还会经过 global -> config -> global 的 compat,我看了下 config 当前确实还移除不彻底, config.Http3Config 还没有这 4 个字段,所以 YAML 下现在不会生效,如果后续把 Load/init 链路里对 config 的依赖彻底移除,这个问题会自然消失。因为本地 YAML 现在本来就是先反序列化到 InstanceOptions(global),只是后面还会经过 global -> config -> global 的 compat 往返,才把 config 不认识的字段丢掉了

@AlexStocks
Copy link
Copy Markdown
Contributor

向用户的api是不是还没暴露出

build a issue to track this subject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings

5 participants