← All projects

C++ Redis

Building a Redis-compatible server in modern C++ — TCP networking, the RESP protocol, and concurrent client handling via the CodeCrafters challenge.

C++CMakeLinux

Overview

An ongoing project to build a toy Redis clone from scratch in modern C++, following the CodeCrafters Build Your Own Redis challenge.

The goal is to better understand TCP networking, the Redis Serialization Protocol (RESP), event-driven I/O, and how a simple key-value store handles concurrent clients.

Technology

  • C++23 — Core implementation using modern standard library features.
  • POSIX sockets — TCP server bind, listen, and accept.
  • CMake — Build configuration.
  • CodeCrafters — Incremental implementation and automated testing.

Goals

  • Accept TCP connections on the Redis default port
  • Parse and respond to the RESP protocol
  • Implement core commands such as PING, SET, and GET
  • Explore concurrent client handling and in-memory state

Source

View Source Code