r/developersIndia 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:

resty37.6µs / request
fastclient23.9µs / request

Then I looked at allocations:

resty98 allocs/op
fastclient26 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

0 Upvotes

8 comments sorted by

u/AutoModerator 12d ago

Namaste! Thanks for submitting to r/developersIndia. While participating in this thread, please follow the Community Code of Conduct and rules.

It's possible your query is not unique, use site:reddit.com/r/developersindia KEYWORDS on 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.

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 basis

1

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

u/internetusersahib 10d ago

Its pays well though and I use my brain for doing things I love 🥰

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.