Skip to content

SMC242/http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-server

This is a multi-threaded HTTP server that I wrote for the following reasons:

  1. To deep-dive on HTTP
  2. To learn Rust to have a modern systems-programming language in my toolbelt

It is not intended for production use

Features

  • HTTP versions supported:
    • HTTP 0.9
    • HTTP 1.0
    • HTTP 1.1
  • Multi-threading: a thread pool is used
    • I chose to write my own synchronised queue to push myself with the borrow checker and expose myself to Rust's synchronisation primitives
    • This is less efficient than using a MPSC channel like most sources recommend
  • Support for arbitary route handlers via the Handler trait

Planned features

  • Middleware support: should be a small change to RequestQueue as Handler already supports it
  • IDN support: currently I am assuming that hostnames are in ASCII
  • HTTP 2 support
  • TLS support
  • HTTP 3 support: the interfaces have been written with this in mind (HTTP 3 uses QUIC instead of TCP as the transport protocol)
  • Concurrency improvements: move request parsing from the main thread to the worker threads and use non-blocking TCP sockets

About

An HTTP server written in Rust to learn more about networking and Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages