server-benchmarks icon indicating copy to clipboard operation
server-benchmarks copied to clipboard

Kestrel - migration to middlewares

Open NikitaFlimakov opened this issue 4 years ago • 4 comments

NikitaFlimakov avatar Apr 12 '20 20:04 NikitaFlimakov

Hello @NikitaFlimakov, the parameterized code you try to push is not the way-to-go for path parameters, you strip from the request path which is not a valid option. The code in these tests should be used in production, like the rest of the web frameworks. Please restore it at its original state. I see the remove header value, which is a reasonable modification and we should proceed with it.

kataras avatar Apr 13 '20 21:04 kataras

Hi @kataras, thank you for explanation. I've fixed parameterized test for kestrel

NikitaFlimakov avatar Apr 14 '20 09:04 NikitaFlimakov

No problem @NikitaFlimakov, you have more to fix yet... In the parameterized and static tests, you pre-allocate the response body at: https://github.com/kataras/server-benchmarks/pull/2/files#diff-29f8c41b8135fd55c22535de5bb8d252R9 and https://github.com/kataras/server-benchmarks/pull/2/files#diff-e467684229009336fdd14e55e5aa5e94R18 while in other web frameworks, e.g. Iris the body is inside the request handler itself: https://github.com/kataras/server-benchmarks/blob/7f347a73c6bdade9f54360a2af43fa20c061db9e/_code/parameterized/iris/main.go#L8

Please make sure that your changes are used in production, don't try to pre-allocate things just to make .NET Core run faster, it's not fair for other languages and frameworks that are allocating them in serve-time.

kataras avatar Apr 15 '20 05:04 kataras

I've tried to fix all issues

NikitaFlimakov avatar Apr 23 '20 18:04 NikitaFlimakov