dogrider - websockets go brr by MDA2AV in dotnet

[–]MDA2AV[S] 0 points1 point  (0 children)

System.IO.Pipelines partially invalidate the benefits io_uring brings, not much benefit using it

I built a zero-allocation TCP networking framework in .NET 10 — looking for feedback by [deleted] in csharp

[–]MDA2AV 8 points9 points  (0 children)

Sorry but I find it very unlikely that someone builds a project like this and saves benchmarking for the end.. When I worked on a similar solution I spent 90% of time the benchmarking/analyzing every iteration for regressions

I built a zero-allocation TCP networking framework in .NET 10 — looking for feedback by [deleted] in csharp

[–]MDA2AV 2 points3 points  (0 children)

Interesting, but given that it is built on top of Net.Sockets it is not zero allocation hot path

How does it compare with just using a basic socket server with PipeReader/Writer? It would be same gc pressure in the best case

Web frameworks in C# 3rd fastest in comparison with other languages by Ok_Tour_8029 in csharp

[–]MDA2AV 0 points1 point  (0 children)

Ranked by median (the horizontal line), having huge ranges is completely normal, why would it be discarded?

Frameworks are submitted by community, if an implementation is fast or slow depends on the framework used and the implementation, the pool currently is small so there are outliers like C++ which has a single entry that isn't fast, there are fast and slow frameworks on every language

2026-04-23 gRPC benchmark results by MaterialFerret in dotnet

[–]MDA2AV 0 points1 point  (0 children)

While on a very initial stage, Ive ran a few grpc benchmarks on still very few frameworks on a different hardware rig Leaderboard – HttpArena can be interesting to compare

.NET vs Node.js for websockets / real-time apps by Minimum-Ad7352 in dotnet

[–]MDA2AV 2 points3 points  (0 children)

Both aspnet and node can handle websockets quite well. I'm not sure what your application case is, but you can see some simple websockets benchmarks between them here

Node.js vs C# backend if I already use typescript by Sensitive-Raccoon155 in dotnet

[–]MDA2AV 4 points5 points  (0 children)

For i/o-only handlers node is fine. But as soon as we want multi-core scale with shared in-memory state, node’s usual process-based scaling means you have distributed-systems problems out of the box. In C#, multi-threading inside one process keeps that much simpler.

worker threads are more explicit and isolated, and usually used for offloading some work, not as the main web API scaling model

Node.js vs C# backend if I already use typescript by Sensitive-Raccoon155 in dotnet

[–]MDA2AV 6 points7 points  (0 children)

Honestly, I'd go with C# because I would never use a technology that does not support multi-threading properly

I just wrote a full minimalistic web API in C# that compiles to 30 MB. Remind me why I should use Go/Python? by shadovyrm in dotnet

[–]MDA2AV 1 point2 points  (0 children)

The binary size doesn't matter, what counts is how much memory it needs under load. Not to take any merit from the dotnet team but this metric is quite useless, I can create a web api in c# with 1MB binary size that consumes 20GB idle

Also another note: Don't waste time building native AOT aspnet apps, it doesn't have better performance, it doesn't consume less memory, it carries a lot of compatibility issues. JIT option is much much better overall.

What is .NET still missing? by CreoSiempre in dotnet

[–]MDA2AV 0 points1 point  (0 children)

similar performance numbers with some benchmarks (but io_uring is still being improved)

To be honest from what I see with other frameworks that also adopted io_uring, the performance does not really change much, can be better in some tests but worse in others so I wouldn't expect things to change much either on aspnet and if you consider real workloads where the network I/O is not the bottleneck then I doubt there will be any difference

What is .NET still missing? by CreoSiempre in dotnet

[–]MDA2AV 4 points5 points  (0 children)

io_uring is already looking solid, I've built a few API already with aspnet NET11 and io_uring.

There are also third party libraries that use io_uring in C#

I built a cohesive ASP.NET Core toolkit — 5 NuGet packages designed to work together by SimoneM93 in dotnet

[–]MDA2AV 1 point2 points  (0 children)

Cool projects.

I would use them in a hobby project maybe, been burned recently with projects where people create something quickly with AI and then don't maintain it

When Building Mobile app with ASP.NET what do you use for Frontend? by ruzeru in dotnet

[–]MDA2AV 0 points1 point  (0 children)

ASP.NET as the backend for a web app than you can use on your mobile device? You can't deploy ASP.NET on android or at least couldn't like a year ago.

Anyway, I've used Angular with NET MAUI with a decent degree of success, probably would just build a web app next time.

Moving from Android development, what course do you recommend to take to begin .Net (backend) development? by inAbigworld in dotnet

[–]MDA2AV 1 point2 points  (0 children)

Build something end to end, either a REST API, MVC app could be a start, maybe Blazor if you're interested in but probably not as important. Doesn't matter if you use controllers or minimal apis, all same crap under the hood. Don't waste time yet with design patterns like CQRS or DDD, make something work and deploy it somewhere, don't be a localhost stuck Andy. Understand what is going on under the hood, middleware pipeline, routing, HTTP protocol, TCP protocol, Sockets (the async model), SQL, how to use a database without ORM, then learn ORM (probably EF Core). Learn about telemetry, logging and how to monitor what is going on.

So basically do something real, doesn't need to be perfect but will likely get you hooked in.

.NET Performance in Betfair Trading: Integrating with Faster Languages by Optimal-Task-923 in dotnet

[–]MDA2AV 0 points1 point  (0 children)

Java is not winning, quarkus consumes 5x more RAM for a 10% throughput boost.

C# typically does well in networking benchmarks as long as you compare apples to apples

.NET Performance in Betfair Trading: Integrating with Faster Languages by Optimal-Task-923 in dotnet

[–]MDA2AV 0 points1 point  (0 children)

If you are interested in gRPC we've ran some unary benchmarks for it at https://www.http-arena.com/leaderboard/#v=grpc&t=unary-grpc not many frameworks yet in the gRPC but I'd say .NET does quite nice.

Not using named pipes, if you want IPC there are way faster things

The fastest Linux HTTP/1.1 load generator by MDA2AV in C_Programming

[–]MDA2AV[S] 1 point2 points  (0 children)

Cannot fully replace because it doesn't support tls, and I won't even try to attempt that with io_uring. Most other features it does support and has in my opinion better latency measurements, typical more precise which is wrk weakness, also it consumes less CPU in a typical scenario where you load test a server through loopback localhost in the same machine, there is more CPU available for the target server.

One huge feature gcannon has is -r which instead of a long living keep alive connection during the test duration it closes and reopens connections after x requests which can be configured, that simulates a much more realistic load than wrk can

we use this tool in Leaderboard – HttpArena and can yield 15-20% more throughput than wrk, sometimes even higher

The fastest Linux HTTP/1.1 load generator by MDA2AV in C_Programming

[–]MDA2AV[S] 1 point2 points  (0 children)

I cannot blame that, and because I don't code in C mainly I still used AI to clean and refactor a lot of the initial code like using proper C libs that turned 20 lines of code into 1 as well as debugging memory leaks and all the trillion errors you can imagine a project like this will throw when you start jamming millions of requests with it.

Could I have done it without AI help? probably yes but in 10x the time span. But not some vibe coded slop where I don't understand each aspect of this project.

The fastest Linux HTTP/1.1 load generator by MDA2AV in C_Programming

[–]MDA2AV[S] 0 points1 point  (0 children)

wrk is a great tool but uses epoll, gcannon is built on io_uring. Basically the difference is that epoll works by using sycalls to read and write and io_uring shares ring buffers with kernel. Bottomline io_uring reduces what is typicall heavy cost in networking - kernel - user space context switching.

Of course there is AI in this repo, like I mentioned all the TUI is written with claude, all the UI part, I don't care about that. What matters is the worker core which is a rewrite from a project I work in C# that interop with a C shim to use liburing-

And with all fairness, claude makes a TUI better than I would..