smallnest / go-web-framework-benchmark

:zap: Go web framework benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add pipeline to tests

opened this issue · comments

init = function(args)
   request_uri = args[1]
   depth = tonumber(args[2]) or 1

   local r = {}
   for i=1,depth do
     r[i] = wrk.format(nil, request_uri)
   end
   req = table.concat(r)
end

request = function()
   return req
end
$ wrk .... -s pipeline.lua 

Taken from here

as godoc net/http says:

In practice HTTP/1.1 pipelining is not enabled in browsers and not seen often in the wild.

And https://en.wikipedia.org/wiki/HTTP_pipelining#Implementation_in_web_browsers:

Out of all the major browsers, only Opera based on Presto layout engine had a fully working implementation that was enabled by default. In all other browsers HTTP pipelining is disabled or not implemented.

So http pipelining is not so important and I will do the test later

Yes I know that, but you think that web servers are only for web browsers... what about applications ? No problem, you know better, I just post a 3rd party idea :P

added test results

Very good, nice! I think that something is whrong because fasthttp+pipeline is x10 times faster than net/http+pipeline, (37k requests on net/http , 365k requests per seconds on fasthttp if pipeline enabled, without any process time -as valhala posted). I will test it myself when I re-install my linux and tell you the results xD thanks you man!

maybe the reason is I have NRT set the depth of http pipelining. it uses default 1 as depth.
I will add -- / 16 in wrk options and test again

added depth option to 16. Now test result for http pipelining is normal

Good job!, I see that Iris is almost x3 times than echo2fasthttp but it's slower than the fasthttp-raw results... Hmmm I will see what I can do to improve that, thanks again :) you are helping me to get over and over better :P Although I know what I have to do, I must grab the source from valhala and modify it but I don't like to do that kind of things.. but if I have to do it I will do it and give all the credits to valhala ofcourse

Also can I ask you how much time it takes in order the tests to complete? an hour or much? I will need to make many tests to make iris even faster

two or three hours. I am not sure.
I started it this morning and got the result this noon.

Oh I understand... I already let the university for a month + I have to leave from there for good :P