🍵 HteaPot HTTP Server
Spanish | English
Hteapot is a powerful, Rust-based HTTP server and library designed for high-performance web applications. Effortlessly serve static files and handle HTTP requests with resilience and speed.
Features
1. Threaded Architecture
- Custom thread-based system, capable of handling around 70,000 requests per second.
- Emphasizes resilience over peak speed, making it robust under heavy load.
2. Performance Under Load
- Steady performance under high concurrency, managing up to 50,000 requests per second with increased connections.
- Other's performance degrades significantly under high load, while Hteapot remains stable.
3. Low Error Rate
- Achieves a near 100% success rate for 200 OK responses during stress tests, demonstrating strong resilience.
- Outperforms others at similar loads, with minimal error rates under extreme concurrency.
Use
standalone http server
You can configure the server using a TOML file. Here's an example configuration:
[]
= 8081 # The port on which the server will listen for incoming connections.
= "localhost" # The host address to bind the server to.
= "public" # The root directory from which to serve files.
Then running with
or serving a file or folder directly
Library
For use hteapot as a library in rust
- Install the library
- Then you can use it in your project
use ;
Build
- Clone the repository:
- Build the project:
Run the server with a configuration file:
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.