You are browsing as a guest. Sign up (or log in) to start making projects!

4h 58m 15s logged

Zephyr Devlog #1 :yay:

This week I focused on getting the core of Zephyr working and making it as fast as possible.

What I built

  • Core HTTP server using Hyper
  • Router with support for static and dynamic routes
  • Static file serving
  • Plugin system
  • Metrics for tracking requests
  • Benchmark suite to compare Zephyr with other frameworks

Bugs I fixed

I found a few bugs while writing integration tests:

  • Body size limits weren’t always enforced.
  • If-None-Match headers weren’t working correctly.
  • The rate limiter rewrote some valid configs.

These were all fixed after writing more tests.

Performance

After benchmarking, I realised the server wasn’t using all CPU cores efficiently. I rewrote the threading model so each worker had its own runtime, which increased throughput by about 45%.

Current plaintext benchmark:

| Framework | Requests/sec |
| Zephyr | 321k |
| actix-web | 314k |
| Node.js (cluster) | 266k |

I’m happy that Zephyr is now competitive with one of the fastest Rust web frameworks.

Next

  • Better WebSocket support
  • Streaming static files
  • More realistic benchmarks (JSON, databases, uploads)
  • More plugin improvements
  • Benchmarking things like RAM usage too
    Overall I’m really happy with how the project is progressing. The biggest lesson this week was to benchmark before assuming something is the bottleneck.
0
70

Comments 4

@f

wow looks super good @f

@f

thanks so much @f i appreciate the feedback a lot

@layerblayerplus

cool

@f

@layerblayerplus thx :3 !!