Fasthttp provides an http server optimized for high performance. It doesn't allocate memory in hot paths - the same approach is used by httprouter.
With fasthttp gin may become even faster. See also fasthttprouter, httprouter fork based on fasthttp.
@valyala This would be great, but even greater would be a @valyala powered middleware project that incorporates fasthttp and fasthttprouter and comes with lots of middleware (conversions from existing middleware). If done elegantly, I think it might even become the standard.
+1
@valyala @mpmlj @nkev I am going to evaluate it this week!
:thumbsup:
Hi @manucorporat ,
will v2 be based on fasthttp? I guess so, because of your speed improvements mentioned in another issue.
I would be really glad if I could help you with the transition.
@slinso hi there,
We are looking forward creating a plug able interface for http compliant packages such as fast http.
@javierprovecho
Ok, sounds nice! https://github.com/labstack/echo/blob/v2/engine/engine.go looks like the same idea.
This is a fantastic idea! Imagine Gin's speed on fasthttp... +1
+1
See also fasthttp-routing from Yii author.
@manucorporat any news on your fasthttp evaluation?
+1
+1
+1
Echo can run with FastHTTP server now.
Any updates on this? @manucorporat
@otraore as I told you on gitter, let me try to make an experimental version of gin with fasthttp, this weekend on my spare time :wink:
@javierprovecho Good to hear! thats great news! Maybe add the milestone v2 to this issue?
Great news!! 馃憤
@otraore that was too good, fasthttp is not what I though. It doesn't compensate the effort of moving every aspect of gin v1 to fasthttp because of how different it is. Definitely I'm going to create the v2 milestone, but this is going to take some more time than just a weekend.
(I started a "fasthttp" branch, however it is not functional :sleeping: I'll keep watching it next week)
I think I'm going to follow the path @manucorporat did sometime, forking fasthttprouter
and evolving it to gin-fast or something similar...
+1
Note that echo
author decided to drop fasthttp
support to bring back simplicity for echo v3 https://github.com/labstack/echo/issues/665. Maybe this can help with some decisions.
Yes, everybody can refer release note for echo v3.
gin will not use fasthttprouter ?
@rebootcode No.
https://github.com/gin-gonic/gin/issues/498#issuecomment-312466393
No as ( It will use ) or ( It will not use ) ?
as @jbub comments.
Note that
echo
author decided to dropfasthttp
support to bring back simplicity for echo v3 labstack/echo#665. Maybe this can help with some decisions.
I think we don't support fasthttprouter in the future.
@javierprovecho @tboerger What is your thoughts?
I personally don't want to support it. It got some downsides like workarounds, no http2... Just to mention 2 reasons.
馃憤
no plans for near future, last time i checked fast http breaks a lot of features gin rely on.
closing
Most helpful comment
I personally don't want to support it. It got some downsides like workarounds, no http2... Just to mention 2 reasons.