Yeah, you probably want to avoid fasthttp. Chi https://github.com/go-chi/chi and Gin https://github.com/gin-gonic/gin Are both better than the base httpserver and I've using them in large scale adtech deployments without issue.
Also you can get BETTER performance out of the base http client (over fasthttp's) if you just tweak the settings a bit to do a lot of the stuff fasthttp also does under the hood. See something like: https://gist.github.com/AngerM/5059b3ff16292f3fbee990bae7046381 -Matt On Friday, June 7, 2019 at 8:12:17 AM UTC-7, Burak Serdar wrote: > > On Fri, Jun 7, 2019 at 9:01 AM Ronny Bangsund <ronny....@gmail.com > <javascript:>> wrote: > > > > Yes, the built-in is pretty awful in many ways. There are fortunately > lots of alternatives, all with roughly an order of magnitude better > performance. I inspected this list yesterday to finally make a choice of > packages to use: https://github.com/smallnest/go-web-framework-benchmark > > > > I ended up with the following as my weapons of choice: > > - https://github.com/valyala/fasthttp (the core HTTP server) > > - https://github.com/fasthttp/router (paths) > > - https://github.com/phachon/fasthttpsession (sessions/non-REST stuff) > > Some time ago somebody posted a memory corruption problem which turned > out to be a race condition in one of these fasthttp libraries. Some of > the optimizations rely heavily on unsafe use. > > > > > > > There are other packages near the performance of fasthttp, and sometimes > you just want "good enough" performance to gain some conveniences. Most, if > not all, are likely to be better choices for performance than the Go http > package. The ones above just looked most agreeable to me :) > > > > For template engines, it depends on your needs. If you're preparing > pages to serve them statically the standard packages are fine > (html/template, or even text/template for certain uses). If you're > constantly rebuilding pages you'll want to look into faster template > engines. > > > > -- > > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to golan...@googlegroups.com <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/19767e83-c498-4842-b41c-145730775c05%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/160e769a-3905-4846-b85c-2004876ee5bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.