Algorithm of Massively Parallel Networking in C++

Vladislav Shpilevoy

Tech
Internals
Conf

Meetup 2025 Spring

- Hello, guys, my name is Vlad. I've been writing code in C and C++ for 10 years now. During this time, I've worked with databases, games, and advertising. - In all these areas, I've done a lot of work with network code, seen various problems and solutions, some of which created myself, including problems. - And today, I'm presenting an algorithm I have created for, what I believe to be, quite efficient networking, implemented in C++, but suitable for some other languages too. - It's something you probably haven't seen before. Not necessarily in a good way. - In the sense that the same solution can be the worst or the best in different contexts. - Nonetheless, I've found that my algorithm turned out to be noticeably better than what I worked with before it. - I emphasize that today our main focus is on the algorithm itself and some details, not its implementation as a whole. - Because there's not much point in that. Existing projects are unlikely to switch their network stack to a new library. And new big projects don't come up that often. - But I believe in the value of spreading ideas. Perhaps mine will seem interesting enough to someone to apply them in their own work, not necessarily taking my implementation. - I hope you enjoy it! ## For readers In the speaker notes, the sign (>>) means that you need to press "Space" to move to the next frame/animation/slide.
Algorithm of Massively Parallel Networking in C++ Vladislav Shpilevoy Tech Internals Conf Meetup 2025 Spring

Tech Internals Meetup 2025: Algorithm of Massively Parallel Networking in C++

By Vladislav Shpilevoy

Tech Internals Meetup 2025: Algorithm of Massively Parallel Networking in C++

My talk is dedicated to the performance of C++ servers using an alternative to boost::asio for massively parallel network operations. boost::asio is effectively the standard for network programming in C++, but in rare cases, it may be unavailable or insufficient for various reasons. Drawing from my experience in high-performance projects, I developed a new task scheduling algorithm, built a networking library based on it, and am presenting them in this talk. The most interesting aspects include fair CPU load distribution, support for C++ coroutines, formal verification with TLA+, and reproducible benchmarks demonstrating an N-times speedup over boost::asio. The project is open-source: https://github.com/Gerold103/serverbox.

  • 33