Skip to content

Very naive HTTP server based on the Chapter 20 of the online Rust Book

License

Notifications You must be signed in to change notification settings

AbdouSeck/naivehttpserver-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A naive Rust HTTP server

This is the outcome of following the instructions from Chapter 20 of the Rust Book.

lib.rs is where you would find the ThreadPool object that handles the incoming HTTP requests.

parsers.rs contains functions that help with parsing the HTTP requests.

main.rs uses the tools from lib.rs to handle incoming requests. It only handles / and /sleep* endpoints, hence the naive qualification.

The runner.py script is written to test how well the server handles requests. You can invoke it with the base url of the http server, along with a number of GET requests to send. The script uses python threads to try and send concurrent requests to the http server. This is really not so bad with the GIL and all, since we're dealing mostly with IO ops here.

About

Very naive HTTP server based on the Chapter 20 of the online Rust Book

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published