<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yasir Saleem</title>
    <description>The latest articles on DEV Community by Yasir Saleem (@yasir_saleem).</description>
    <link>https://dev.to/yasir_saleem</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245476%2F1827acdc-2a5e-44c0-9b7e-5744afb92cf9.jpg</url>
      <title>DEV Community: Yasir Saleem</title>
      <link>https://dev.to/yasir_saleem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasir_saleem"/>
    <language>en</language>
    <item>
      <title>I got tired of Redis and Kafka eating my RAM, so I rebuilt them in Rust hitting 1.6M RPS (as a student)</title>
      <dc:creator>Yasir Saleem</dc:creator>
      <pubDate>Sun, 15 Nov 2026 06:35:24 +0000</pubDate>
      <link>https://dev.to/yasir_saleem/i-got-tired-of-redis-and-kafka-eating-my-ram-so-i-rebuilt-them-in-rust-hitting-16m-rps-as-a-3702</link>
      <guid>https://dev.to/yasir_saleem/i-got-tired-of-redis-and-kafka-eating-my-ram-so-i-rebuilt-them-in-rust-hitting-16m-rps-as-a-3702</guid>
      <description>&lt;p&gt;Hey everyone, I’m Yasir. I’m an 18-year-old software engineering student from Pakistan, and for the last few months, I’ve been going down a very deep, very complex rabbit hole: Systems Programming in &lt;strong&gt;Rust&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;When I started learning about distributed systems&lt;/strong&gt;, I noticed a recurring theme: tools like Apache Kafka and Redis are absolute industry standards, but they come with a catch. Kafka relies heavily on the JVM (hello, GC pauses and massive memory footprints), and standard in-memory stores often hit bottlenecks when scaling across modern multi-core CPUs due to OS-level thread contention and locks.&lt;br&gt;
I didn't have the budget to run massive AWS clusters for my personal projects. I needed something that could run on a potato but still handle enterprise-level throughput.&lt;br&gt;
So, I decided to build my own.&lt;br&gt;
Enter Velocity-Suite &lt;strong&gt;(Velocity-MQ &amp;amp; VelocityDB)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;I built two core **infrastructure pieces entirely from scratch in Rust:&lt;br&gt;
Velocity-MQ: A zero-GC, lock-free message queue (Kafka alternative).&lt;br&gt;
**VelocityDB&lt;/strong&gt;: &lt;em&gt;A thread-per-core, lock-free in-memory store (Redis alternative).&lt;br&gt;
My goal wasn't just to write another wrapper. I wanted to bypass traditional OS bottlenecks entirely. Here is the architecture that made it&lt;/em&gt; happen:&lt;br&gt;
&lt;strong&gt;1_. Bypassing the Kernel with io_uring&lt;/strong&gt;&lt;br&gt;
Traditional synchronous I/O or even epoll wasn't cutting it for the persistent disk I/O I wanted. I integrated Linux io_uring for asynchronous I/O. By using O_DIRECT, the system completely bypasses the OS page cache. This means zero-copy transfers straight from the disk to the application memory, resulting in microsecond latencies._&lt;br&gt;
&lt;strong&gt;2. Thread-per-Core Architecture&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Instead of having multiple threads fighting over a shared state (and melting the CPU with context switches), I used a thread-per-core model. Each thread owns its data. No locks, no mutexes blocking the hot path.&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;3. Lock-Free Concurrency&lt;/strong&gt;&lt;br&gt;
To allow threads to communicate without slowing down, I heavily utilized lock-free data structures (like ring buffers) and atomic pointers. Fighting the Rust borrow checker while dealing with std::sync::atomic memory ordering (Acquire/Release semantics) was probably the hardest thing I’ve ever done, but the performance payoff was insane.&lt;br&gt;
&lt;strong&gt;The Benchmarks 🚀&lt;/strong&gt;&lt;br&gt;
After weeks of debugging segmentation faults and memory ordering bugs, I finally ran the benchmarks on my local machine:&lt;br&gt;
&lt;strong&gt;VelocityDB: **Reached **1.6M&lt;/strong&gt;+ Requests Per Second &lt;strong&gt;(RPS)&lt;/strong&gt;. Click this : &lt;a href="https://github.com/developer-yasir/velocitydb" rel="noopener noreferrer"&gt;https://github.com/developer-yasir/velocitydb&lt;/a&gt; .&lt;br&gt;
&lt;strong&gt;Velocity-MQ&lt;/strong&gt;: &lt;strong&gt;Pushed 600k+&lt;/strong&gt; ops/sec with virtually zero garbage collection overhead.  &lt;a href="https://github.com/developer-yasir/Velocity-MQ" rel="noopener noreferrer"&gt;https://github.com/developer-yasir/Velocity-MQ&lt;/a&gt; &lt;br&gt;
Running this on minimal RAM felt like a superpower.&lt;br&gt;
&lt;strong&gt;Why I am sharing this (I need your help!)&lt;/strong&gt;&lt;br&gt;
I am incredibly proud of what I've built, but I am also just a 1st-semester CS student. I know for a fact that my code isn't perfect. Systems programming is brutal, and edge cases around memory barriers and crash recovery are terrifying.&lt;br&gt;
I am putting this out here because I want to learn from the best.&lt;br&gt;
If you are a senior Rustacean, a systems engineer, or just someone who loves high-performance backends, I would be honored if you could look at my code.&lt;br&gt;
Roast my architecture.&lt;br&gt;
Tell me where my memory ordering is flawed.&lt;br&gt;
Open an issue if you see a bug.&lt;br&gt;
You can check out the code here:&lt;br&gt;
🔗 &lt;a href="https://github.com/developer-yasir/" rel="noopener noreferrer"&gt;https://github.com/developer-yasir/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you find this project interesting or helpful, dropping a ⭐ on the repo would mean the world to me and keep me motivated to keep building!&lt;br&gt;
Let me know your thoughts in the comments. Let's talk about io_uring and Rust!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>opensource</category>
      <category>database</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
