Next-gen networking infrastructure with Rust and Tokio (Carl and Sean)
Posted Feb 21, 2021, 12:04 PM UTC
40316
Posted Feb 21, 2021, 12:04 PM UTC
nice! gave me another inspiration to learn rust :)
That’s the thing I loved about Rust when I was working on https://github.com/maxpert/drep
I did evaluate solutions like C++, Go, Nim etc. Rust ended up being my favorite because I was just focused on the problem at hand and what I got was memory efficient and speedy program. Not even trying hard for speed and memory safety.
They don't actually talk about anything AWS is doing.
Rough timeline:
ArcMutexThis is probably good for beginners. I've been using Tokio (and Hyper) for a year and none of it was new to me.
It's amazing how fast Rust-the-ecosystem got this all figured out - When I started, I wasn't sure what the difference was between mio and tokio and hyper and rocket and actix.
Now I always reach for Hyper as my HTTP server lib, and always end up using Tokio as the async runtime. I don't know if Hyper is the fastest, but it does streaming bodies and it's easy to work with. I rarely have any situation like "Ugh Hyper is getting in my way!"
I thought Java and Go (And C#) had concurrent GCs? The proponents are often saying that GC isn't that bad.
They do, including pauseless GCs in Java's case.
In what concerns C# (including other .NET languages) and Go, you can also do C++ style programming, but many keep to fail to learn how to do it.
https://devblogs.microsoft.com/aspnet/grpc-performance-improvements-in-net-5/
There's a program that I've been trying to write, and Java is the ideal language except for GC pause times (even 10ms is unacceptable if it happens more than once or so per minute). You mentioned that pauseless GCs exist, but when I tried to find more information I couldn't find anything actionable. All I found was Azul which looks like a proprietary solution that is only fit for if I'm the only person running my code (e.g. a website backend), but that isn't the case for me as I need to distribute to end users and I am looking for FOSS solutions (it's preferable to me to write it in Rust or C++ than to deal with a proprietary GC). Is Azul what you were referring to, or is there a pauseless GC that I'm unaware of?
Try Java11 and ZGC. most time 1ms pause and free and java native.
I confirm, the switch from JVM 11 to JVM 13+ZGC has seen a dramatic reduction in GC pause times on our applications. There are still GC spikes (> 1 ms) but much more infrequent.
It's still not good enough for truly latency-sensitive work, but for only somewhat-latency-sensitive work it's not bad.
Pauseless GC from Azul is called C4 and you need a license to have it.(expensive)
as far as i know, they are both employed to focus on the Tokio project and associated work, and have little involvement in AWS internal or commercial work
On the GC: it depends on what you need /expect. Those pauses are there and if you have lots of requests, some of these can take noticeable longer. This may or may not be an issue.
I haven't tried hyper http server, but tide has proven very light and easy to work with for me.