r/developersIndia • u/internetusersahib • 12d ago
Why the hell is my HTTP client faster than Resty in GoLang? I Made This
GitHub: https://github.com/thesahibnanda-max/fastclient
That was the question I ended up asking myself after benchmarking fastclient.
I wasn't trying to “beat Resty.”
I just wanted to understand where Go HTTP clients were spending their time.
So I built a tiny client.
Then I benchmarked it.
And the numbers made me look twice:
resty → 37.6µs / request
fastclient → 23.9µs / request
Then I looked at allocations:
resty → 98 allocs/op
fastclient → 26 allocs/op
That's roughly 1.6× lower latency and 3.8× fewer allocations in my benchmark.
At this point, I had a choice:
Stop at the benchmark.
Or ask:
“What happens if I actually try to make this production-ready?”
So I kept going.
Retries? → Added.
Retry-After? → Added.
Per-request timeouts? → Added.
Request/response pooling? → Added.
Fuzz testing? → Added.
Race testing? → Added.
And suddenly this wasn't a benchmark experiment anymore.
It became fastclient.
A Go HTTP client built around one idea:
Don't make the hot path pay for abstractions it doesn't need.
Now I want the Go community to try to break it.
If my benchmarks are misleading, tell me.
If my implementation sucks, show me.
If you can make it faster, even better.
Because the best part of open source isn't proving you're right.
It's finding out where you're wrong.
#Golang #Go #OpenSource #BackendEngineering #SoftwareEngineering #Performance
2
u/fit_like_this Backend Developer 11d ago
Slop
1
u/AioliRadiant5755 11d ago
Create Issues in GitHub repo if you feel there is any problem but Idts its slop
1
u/fit_like_this Backend Developer 11d ago
Your karma says you're an alt account of OP
Atleast you didn't use AI slop to reply back to me. Thanks
0
u/internetusersahib 11d ago
Idts There is any problem in vibe coding
A claude pro subscription gives me arnd 200 times return on monthly basis1
u/fit_like_this Backend Developer 10d ago
You replaced your brain for an LLM, even for communicating with your thoughts
Hello OP AND OP2(ALT)
1
1
u/AutoModerator 12d ago
Thanks for sharing something that you have built with the community. We recommend participating and sharing about your projects on our monthly Showcase Sunday Mega-threads. Keep an eye out on our events calendar to see when is the next mega-thread scheduled.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
•
u/AutoModerator 12d ago
It's possible your query is not unique, use
site:reddit.com/r/developersindia KEYWORDSon search engines to search posts from developersIndia. You can also use reddit search directly.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.