News for hackers. Stuff that matters.
Re:Gnet is the fastest networking framework in Go by tutfbhuf on Thursday March 14, 2024 @06:26PM (#39709674)
People in the Go community often respond with "use net/http for building web apps", the standard library is good enough and has better support in the long run. This is good advice in most cases. However, if you are using Go for API building and explicitly want to squeeze out every little bit of performance, then there are much faster libraries available than the standard net/http. Gnet is one such example.
Re:Gnet is the fastest networking framework in Go by tazu on Thursday March 14, 2024 @06:34PM (#39709742)
Is there an HTTP server library built on top of this? I'm getting tired of Fiber/FastHTTP.
Re:Gnet is the fastest networking framework in Go by tutfbhuf on Thursday March 14, 2024 @06:48PM (#39709885)
What are your current issues with Fiber/FastHTTP?
Re:Gnet is the fastest networking framework in Go by tazu on Friday March 15, 2024 @02:03AM (#39712490)
Why'd you downvote me for asking a question? Or are you personally affiliated with the libraries?

My issue with Fiber is the documention.

Re:Gnet is the fastest networking framework in Go by tutfbhuf on Friday March 15, 2024 @08:11AM (#39714662)
I haven't downvoted you. Actually, now that you mention having been downvoted, I have given you an upvote to counter one of the downvotes. Your question is absolutely legitimate and I'm in no way affiliated with any of the Go libraries.
Re:Gnet is the fastest networking framework in Go by Akronymus on Thursday March 14, 2024 @06:40PM (#39709800)
And what are the downsides? Hard to maintain code? Having to deeply integrate the code to get the advertised performance?

Also: "Multiple Porotocols"

Oh, there it is on the github: "Note that the HTTP implementation of gnet on TechEmpower is half-baked and fine-tuned for benchmark purposes only and far from production-ready."

Re:Gnet is the fastest networking framework in Go by justinzollars on Thursday March 14, 2024 @07:05PM (#39710047)
"the standard library is good enough and has better support in the long run"
Re:Gnet is the fastest networking framework in Go by dbt00 on Thursday March 14, 2024 @09:16PM (#39711095)
“All performance benefits go out the window the moment you have to do any computation in a goroutine” probably.

Go is the one language that should never have to suffer the pain of sync/async splits. Why would you want to opt into that?

Re:Gnet is the fastest networking framework in Go by weitendorf on Thursday March 14, 2024 @06:59PM (#39709984)
https://gnet.host/docs/about/overview/ - This is a very similar threading model to envoy [0] and lmax disruptor [1]. Unfortunately IIUC writing this in Go still prevents the spin-locked acceptor thread from achieving the kind of performance you could get in a non-GC language, unless you chose to disable GC, so I'd guess Envoy is still faster.

https://gnet.host/docs/quickstart/ it's nice that you can use this simply though. Envoy is kind of tricky to setup with custom filters, so most of the time it's just a standalone binary.

[0] https://blog.envoyproxy.io/envoy-threading-model-a8d44b92231...

[1] https://lmax-exchange.github.io/disruptor/#_what_is_the_disr...

Re:Gnet is the fastest networking framework in Go by bsaul on Thursday March 14, 2024 @07:41PM (#39710354)
can you run grpc over it ?
Re:Gnet is the fastest networking framework in Go by xyzzy_plugh on Thursday March 14, 2024 @09:52PM (#39711303)
If you can do tcp then you can do grpc.
Re:Gnet is the fastest networking framework in Go by danesparza on Thursday March 14, 2024 @10:57PM (#39711619)
If you don't have docs and examples, then I guess it doesn't do grpc.
Re:Gnet is the fastest networking framework in Go by rmac on Thursday March 14, 2024 @08:47PM (#39710869)
the perf is for plaintext? why not encoded?

no quic / h3 ?

love the work and that it's open source but let's push the envelope!

Re:Gnet is the fastest networking framework in Go by linter on Thursday March 14, 2024 @08:53PM (#39710924)
Lacking documentation. Take a look at Django if you want to learn how to write your documentation.
Re:Gnet is the fastest networking framework in Go by logicchains on Friday March 15, 2024 @01:39AM (#39712381)
Most of the documentation is in mandarin, since it was developed in China.
Re:Gnet is the fastest networking framework in Go by latchkey on Thursday March 14, 2024 @09:45PM (#39711261)
I built a tcp service using gnet and it was fantastic. I was really impressed with how easy it was to integrate with.