# qinguoyi/tinywebserver

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/qinguoyi-tinywebserver).**

19,582 stars · 4,248 forks · C++ · Apache-2.0

## Links

- GitHub: https://github.com/qinguoyi/TinyWebServer
- awesome-repositories: https://awesome-repositories.com/repository/qinguoyi-tinywebserver.md

## Description

TinyWebServer is a lightweight HTTP web server written in C++ for Linux. It is designed to handle HTTP requests and serve static content using low-level Linux system calls for network connection management.

The server utilizes a state machine to parse GET and POST data from network sockets. It incorporates a MySQL database connection pool to manage reusable links and reduce the overhead of opening and closing sessions.

The project covers static media streaming for images and video files, user authentication workflows for registration and login, and system activity logging via both synchronous and asynchronous methods. It also includes timer-based connection pruning to automatically close idle network sessions and reclaim server resources.

## Tags

### Web Development

- [Web Servers](https://awesome-repositories.com/f/web-development/web-servers.md) — A lightweight C++ server for Linux designed to handle HTTP requests and deliver static content.
- [HTTP Request Handling](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling.md) — Implements core logic for parsing and managing incoming HTTP GET and POST requests. ([source](https://github.com/qinguoyi/tinywebserver#readme))
- [Request Parsing](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling/request-parsing.md) — Uses a state-machine approach to parse raw socket data into structured HTTP request objects.
- [HTTP Servers](https://awesome-repositories.com/f/web-development/http-servers.md) — A lightweight C++ implementation of an HTTP server for Linux.

### Content Management & Publishing

- [Digital Media Delivery](https://awesome-repositories.com/f/content-management-publishing/digital-media-delivery.md) — Streams image and video files from the server to clients using standard web protocols. ([source](https://github.com/qinguoyi/tinywebserver#readme))

### Networking & Communication

- [Direct-to-Network File Streaming](https://awesome-repositories.com/f/networking-communication/direct-to-network-file-streaming.md) — Streams binary media data directly from the local filesystem to network clients.
- [Media Streaming Protocols](https://awesome-repositories.com/f/networking-communication/media-streaming-protocols.md) — Implements the transport and delivery of static image and video files over web protocols.
- [Network Server Implementations](https://awesome-repositories.com/f/networking-communication/network-server-implementations.md) — Low-level server implementation utilizing Linux system calls for socket and resource management.

### Software Engineering & Architecture

- [State-Machine Parsers](https://awesome-repositories.com/f/software-engineering-architecture/state-machine-parsers.md) — Utilizes a state-machine parser to sequentially decode GET and POST data from network sockets.

### Data & Databases

- [Database Connection Managers](https://awesome-repositories.com/f/data-databases/database-connection-managers.md) — Optimizes persistent data storage connectivity via a managed connection pool.
- [Connection Pool Managers](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/connection-transaction-management/connection-pool-managers.md) — Provides a connection pool to manage reusable database links and reduce session establishment latency.
- [Connection Pooling](https://awesome-repositories.com/f/data-databases/high-concurrency-database-access/connection-pooling.md) — Manages a pool of reusable database connections to optimize multi-threaded access and reduce overhead. ([source](https://github.com/qinguoyi/tinywebserver#readme))

### Operating Systems & Systems Programming

- [Connection Timeout Management](https://awesome-repositories.com/f/operating-systems-systems-programming/connection-timeout-management.md) — Automatically closes idle network sessions using timers to prevent resource exhaustion and reclaim server sockets. ([source](https://github.com/qinguoyi/tinywebserver#readme))
- [Idle Connection Pruning](https://awesome-repositories.com/f/operating-systems-systems-programming/idle-connection-pruning.md) — Automatically closes idle network sessions using timers to prevent resource exhaustion.
- [Socket Inactivity Optimization](https://awesome-repositories.com/f/operating-systems-systems-programming/inactivity-based-resource-optimization/socket-inactivity-optimization.md) — Optimizes server memory and performance by pruning inactive network connections via timers.

### Security & Cryptography

- [Credential Validation](https://awesome-repositories.com/f/security-cryptography/identity-authentication/user-identity-verification/credential-validation.md) — Verifies user registration and login attempts by checking credentials against a persistent database. ([source](https://github.com/qinguoyi/tinywebserver#readme))
- [User Authentication Workflows](https://awesome-repositories.com/f/security-cryptography/user-authentication-workflows.md) — Provides end-to-end workflows for user registration and login credential verification.

### Part of an Awesome List

- [DevOps & Infrastructure](https://awesome-repositories.com/f/awesome-lists/devops/devops-infrastructure.md) — Lightweight web server
- [Embedded Systems](https://awesome-repositories.com/f/awesome-lists/devops/embedded-systems.md) — POSIX-compatible real-time microkernel OS.
- [Network and Server Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/network-and-server-frameworks.md) — Lightweight Linux-based web server implementation.
- [Web Development](https://awesome-repositories.com/f/awesome-lists/devtools/web-development.md) — High-performance Web server with epoll support.
