|
|
2 hafta önce | |
|---|---|---|
| .. | ||
| src | 2 hafta önce | |
| templates | 2 hafta önce | |
| .gitignore | 2 hafta önce | |
| Cargo.lock | 2 hafta önce | |
| Cargo.toml | 2 hafta önce | |
| README.md | 2 hafta önce | |
| benchmark_config.json | 2 hafta önce | |
| config.toml | 2 hafta önce | |
| ignitia.dockerfile | 2 hafta önce | |
| rustfmt.toml | 2 hafta önce | |
This repository contains the TechEmpower FrameworkBenchmarks implementations for the Ignitia web framework, designed to showcase high-performance web API serving in Rust.
| Binary | Description |
|---|---|
ignitia |
Basic variant with JSON and plaintext endpoints |
ignitia-pg |
PostgreSQL variant using tokio-postgres |
ignitia-pg-pool |
PostgreSQL variant using deadpool connection pooling |
ignitia-mongo |
MongoDB variant |
All variants implement the following HTTP endpoints:
/plaintext - Returns a simple plaintext "Hello, World!"/json - Returns a JSON-serialized message/db - Single database query for a random World record/queries?q=N - Multiple database queries, default 1, max 500/updates?q=N - Database updates with N queries, default 1, max 500/fortunes - Renders HTML table with fortunes and adds one dynamicallyUse the provided docker-compose.yml to start PostgreSQL and MongoDB databases locally:
docker-compose up -d
Initialize databases using provided SQL and JS scripts (init-db.sql, init-mongo.js).
Update .env with correct connection URLs and ports.
Build all variants:
cargo build --release
Run a variant (example PostgreSQL):
./target/release/ignitia-pg
Change ports if needed by modifying .env.
Use curl or the included test scripts to verify endpoints.
Example:
curl http://localhost:8000/json
curl http://localhost:8000/queries?q=5
curl http://localhost:8000/fortunes
Ignitia includes several performance optimizations:
The expected throughput matches or exceeds other Rust web frameworks in TechEmpower benchmarks.
Build the container image:
docker build -t ignitia-techempower -f ignitia.dockerfile .
Run the container (default JSON/plaintext variant):
docker run -p 8000:8000 ignitia-techempower
Override command to run other variants:
docker run -p 8000:8000 ignitia-techempower /app/ignitia-pg
Contributions, bug reports, and feature requests are welcome.
Please submit issues or pull requests following the project coding and style guidelines.
This project is licensed under MIT License.