go-cleanhttp
context-switch
go-cleanhttp | context-switch | |
---|---|---|
1 | 13 | |
359 | 684 | |
1.4% | - | |
0.0 | 2.6 | |
over 1 year ago | almost 2 years ago | |
Go | Rust | |
Mozilla Public License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-cleanhttp
-
Rust without the async (hard) part
Yes - `DefaultClient` in `net/http` is what the various package level methods operate on. This is constitutionally bad as global state that dependencies can mutate at will during init (or any other time), hence go-cleanhttp [1].
[1]: https://github.com/hashicorp/go-cleanhttp
context-switch
- Comparison of Rust async and Linux thread context switch time and memory use
-
Async Rust: Cooperative vs Preemptive scheduling
As we can see with these measurements made by Jim Blandy, context switching is roughly 8.5 times faster with async than with Linux threads and use approximately 20 times less memory.
-
What is the point of using async?
https://github.com/jimblandy/context-switch measures the overhead of context switching, which directly contradicts some claims in this thread that context switches are ridiculously expensive:
- Rust without the async (hard) part
- Problems with Async Rust
-
Goroutines Are Not Significantly Smaller Than Threads
I think at 50k you’ll run into various “number” limits as describe here: https://github.com/jimblandy/context-switch#running-tests-with-large-numbers-of-threads
What are some alternatives?
contact - Retryable HTTP client in Go.
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
go-http-client - An enhanced and lightweight http client for Golang
WASI - WebAssembly System Interface
heimdall - An enhanced HTTP client for Go
miniserve - 🌟 For when you really just want to serve some files over HTTP right now!
gev - 🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
proposal - Go Project Design Documents
httpx - Reliable HTTP for GoLang
tigerbeetle - The distributed financial transactions database designed for mission critical safety and performance.
req - Simple Go HTTP client with Black Magic
async-std - Async version of the Rust standard library