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

HTTP/3 support for k6 #3507

Closed
wants to merge 3 commits into from
Closed

Conversation

bandorko
Copy link

@bandorko bandorko commented Dec 16, 2023

What?

HTTP/3 support for k6

Why?

This is a proposal for implementing HTTP/3 support for K6. I know that it is incomplete (e.g.: there are no test), but I'm really interested in your thoughts on this approach. It uses a ConnectionTracker to collect the metrics about the communication.
I also created it as an extension (https://github.com/bandorko/xk6-http3), but because its code is mostly copied from the k6 source, I thought that HTTP/3 implementation would have a better place in the k6 repository.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

#238

Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

Hey @bandorko,
thanks for your contribution 🎉 I appreciate the fact you want to discuss with us the vision of the new API.

As we always suggest and similar to the process we use for building built-in modules, the process for including a new API is to have an extension where we start gathering feedback and usage—you already did it 🤝
When it gets enough traction to justify being included in the core then we start the process.

However, regarding the HTTP proposal. We already have internally the plan to create a new HTTP module, and we added a new design doc explaining our vision around it. So, it sounds like a better approach if an eventual new protocol is implemented following the design we described there.

Regarding the HTTP3 version, the Go team is working on supporting native in Go the 3rd version of the HTTP protocol. Considering it, I think it makes sense to wait for this release before including it directly into the core. In the meantime, the Core team and the community can continue to experiment with other libraries in the extension.

Comment on lines +31 to +43
HTTP3ReqDurationName = "http3_req_duration"
// HTTP3ReqSendingName is the name of the HTTP3ReqSending metric.
HTTP3ReqSendingName = "http3_req_sending"
// HTTP3ReqWaitingName is the name of the HTTP3ReqWaiting metric.
HTTP3ReqWaitingName = "http3_req_waiting"
// HTTP3ReqReceivingName is the name of the HTTP3ReqReceiving metric.
HTTP3ReqReceivingName = "http3_req_receiving"
// HTTP3ReqTLSHandshakingName is the name of the HTTP3ReqTLSHandshaking metric.
HTTP3ReqTLSHandshakingName = "http3_req_tls_handshaking"
// HTTP3ReqConnectingName is the name of the HTTP3ReqConnecting metric.
HTTP3ReqConnectingName = "http3_req_connecting"
// HTTP3ReqsName is the name of the HTTP3Reqs metric.
HTTP3ReqsName = "http3_reqs"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to define new metrics. We could reuse the already defined for the current HTTP module, of course, the proto tag should be different.

@oleiade
Copy link
Member

oleiade commented Dec 19, 2023

I fully align with @codebien points 🙇🏻

@bandorko
Copy link
Author

@codebien, @oleiade: Thank you for the feedback. Then I close this PR and fix the metric names in the extension until http3 will be supported in go and k6.
Do you have a link for the plan of the new HTTP module, or it is still internal?

@bandorko bandorko closed this Dec 19, 2023
@codebien
Copy link
Contributor

codebien commented Dec 19, 2023

@bandorko it's a pleasure. You can find the design doc here. If you would like to align and you need support, feel free to open an issue directly on the extension and ping me.

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

Successfully merging this pull request may close these issues.

3 participants