Skip to content

mishakorzik/echocorn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echocorn

Echocorn is an exceptionally fast, lightweight ASGI server with a custom HTTP/1.1 implementation and first-class HTTP/2 support (powered by the h2 library). Designed for modern web applications, Echocorn combines high throughput with small resource overhead and includes built-in response compression and hardened HTTP header security.

Sometimes unstable. Do not use in production


Key features

  • High-performance ASGI server optimized for low-latency workloads
  • Native HTTP/1.1 implementation plus built-in HTTP/2 support via h2
  • Transparent response compression (gzip/deflate) to reduce bandwidth usage
  • Enhanced HTTP header security (CSP, HSTS, X-Frame-Options, etc.) out of the box
  • Minimal dependencies and small memory footprint
  • Simple command-line interface for quick deployment

Quick install

Install from PyPI:

pip install echocorn

Quick start

Run your ASGI application (example using a callable named app inside app.py):

echocorn --app app:app --port 443

Show all available command-line options:

echocorn --help

Example usage

Use Echocorn to serve a FastAPI, Starlette, or any ASGI app.

# Serve app.app (where `app` is an ASGI application instance)
echocorn --app app:app --host 0.0.0.0 --port 443 --workers 2 --safe-headers --keyfile key.pem --certfile cert.pem

Configuration & options

Echocorn exposes CLI flags for common server settings such as:

  • --app — module:callable path to your ASGI application
  • --host / --port — where the server listens
  • --workers — number of worker processes
  • --certfile, --keyfile — TLS/SSL files for secure connections
  • --compression — toggle or tune response compression
  • --safe-headers — enable security headers
  • --domain — allows requests only if host in headers matches
  • --about — show about the server

Run echocorn --help to see the full set of parameters and defaults.


Security & performance

Echocorn focuses on secure and efficient defaults:

  • HTTP header hardening (CSP, HSTS, X-Content-Type-Options, X-Frame-Options) to reduce common web risks
  • Built-in compression to reduce latency & bandwidth costs for clients
  • Optimised request/response handling path for minimal overhead and maximum throughput

For production use, pair Echocorn with standard hardening measures (firewall rules, TLS best practices, OS-level tuning) and monitor resource usage.


Screenshots

Examples of running Echocorn and request logs:


Donate

If you find Echocorn useful and want to support development, you can donate here:


Community & support

If you find a bug or have questions, open an issue or reach out on Discord.

About

Very fast asynchronous asgi server with HTTP/1.1 and HTTP/2.0

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages