A concurrent web server implemented in C .
Built a fully functional multi-threaded HTTP web server supporting concurrent client connections using a thread pool architecture.
- Fixed-size thread pool (producer-consumer pattern)
- Bounded FIFO request queue with blocking synchronization
- Reader-Writer synchronization with writer priority
- GET and POST request handling
- Server request logging system
- Per-request and per-thread statistics collection
- Debug mode with configurable sleep times
- Master thread accepts incoming connections and adds them to a queue
- Worker threads pick requests from the queue and process them concurrently
- GET requests write to the server log (exclusive access)
- POST requests read the server log (concurrent access allowed)
./server [port] [threads] [queue_size] [debug_sleep_time]Example:
./server 5003 8 16 0C · POSIX Threads · Mutex · Condition Variables · HTTP · Reader-Writer Locks