-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Consider migrating from net/http to valyala/fasthttp #1664
Comments
We've investigated it before, but the biggest obstacle to adoption is that fasthttp still doesn't support HTTP/2... From it's README:
And looking at the repo, there doesn't seem to have been a lot of recent progress, so I'm not holding my breath for it being possible to switch any time soon... 😞 |
I see. Nevertheless I think that the issues I encountered with |
IIRC, HTTP header names are supposed to be case-insensitive... So, yes, There are multiple other issues with the current |
I can happily report that I managed to get my load tests running with stock k6. My custom k6 plugin implements functions that return The issue with the headers turns out to be localized to the cookies. I was using var params = { cookies: { cookie_name : cookie_value } } and I always got a 401 response. Then I realized that according to the documentation In conclusion, this issue can be closed. |
ref #1246 |
I am using k6 for load-testing an application developed by a client. Using k6/http, which is based on net/http, I met some problems and I ended up developing my own http module based on valyala/fasthttp. Here is why:
req.Header.DisableNormalizing()
This is relevant for headers named MY_CUSTOM_HEADER.
In net/http headers are represented as a dictionary (map) of lists. fasthttp supports that and also a dictionary of strings. This is relevant for my use case.
In fasthttp Request has the methods SetBody (for binary content) and SetBodyString. I needed the former. I am aware that k6 currently has poor support for sending a binary body.
And finally, fasthttp claims to be much faster. Pretty good for a load-testing tool!
The text was updated successfully, but these errors were encountered: