Skip to content

Latest commit

Β 

History

History
49 lines (39 loc) Β· 2.2 KB

File metadata and controls

49 lines (39 loc) Β· 2.2 KB

Multithreaded C++ HTTP Server

C++17 Build Docker License

A high-performance, multithreaded HTTP server implementation in C++17 designed to demonstrate system programming concepts, low-level socket management, and modern C++ architectural patterns.

Coursework Project > Author: Stanislav Utkin
Group: ZKS-21


πŸš€ Features

  • High Performance: Implements a custom Thread Pool pattern to handle concurrent connections efficiently without the overhead of creating a new thread per request.
  • Architecture: Clean separation of concerns using OOP principles (Facade, Singleton).
  • Memory Safety: Full adherence to RAII idiom using Smart Pointers (std::unique_ptr), ensuring zero memory leaks.
  • Interactive CLI: A separate UI thread allows controlling the server (checking status, stopping gracefully) in real-time.
  • Configuration: Custom .conf file parser for flexible server settings.
  • Logging: Thread-safe logging system (Console & File) with timestamps.
  • Dockerized: Ready for deployment using Docker and Docker Compose (Multistage build).
  • Tested: Unit tests implemented with Google Test.

πŸ› οΈ Tech Stack

  • Language: C++17
  • Build System: CMake (3.15+)
  • Containerization: Docker
  • Testing: Google Test (GTest)
  • Networking: POSIX Sockets (sys/socket.h)

πŸ“‚ Project Structure

.
β”œβ”€β”€ src/                # Source files (.cpp)
β”‚   β”œβ”€β”€ main.cpp        # Entry point & CLI loop
β”‚   β”œβ”€β”€ HttpServer.cpp  # Network logic (Facade)
β”‚   β”œβ”€β”€ ThreadPool.cpp  # Multithreading logic
β”‚   β”œβ”€β”€ Logger.cpp      # Thread-safe logger
β”‚   └── ...
β”œβ”€β”€ include/            # Header files (.h)
β”œβ”€β”€ config/             # Configuration files
β”œβ”€β”€ tests/              # Unit tests (Google Test)
β”œβ”€β”€ Dockerfile          # Multi-stage build definition
β”œβ”€β”€ docker-compose.yml  # Container orchestration
└── CMakeLists.txt      # Build configuration