Processing time and Latency
mahdi-shojaee opened this issue · comments
According to the Benchmark of different processing time (Latency)
, In all frameworks except fasthttp
, for 0ms
processing time, we have more latencies compared to 10ms
! It's not clear to me. Maybe because of sleeps in the processing code. What do you think?
Thanks for your useful benchmarks.
great found. I think it is not normal for go std lib.
You can test it and whether it is an issue of go std http lib.
I will investigate it too.
@Mehdishojaei I have updated test results and what you found still exist.
I think it is ralated to goroutine scheduler. When we add the "sleep" go runtime can handle other connections.
I add runtime.Gosched()
for 0ms
and now its latency is less than latency of 10ms
. So it should be caused by go scheduler
Nice. Good work. You can open an issue on the golang repo for this.