Skip to content
/ bjoern Public
forked from jonashaag/bjoern

A screamingly fast Python WSGI server written in C.

License

Notifications You must be signed in to change notification settings

shigin/bjoern

 
 

Repository files navigation

bjoern: Fast And Ultra Lightweight Asynchronous WSGI Server

sudo pip install bjoern

A screamingly fast, ultra-lightweight asynchronous WSGI server for CPython, written in C using Marc Lehmann's high performance libev event loop and Ryan Dahl's http_parser.

bjoern aims to be small, lightweight and very fast.

  • less than 800 SLOC (Source Lines Of Code)
  • memory footprint smaller than a megabyte
  • no threads, coroutines or other crap
  • apparently the fastest WSGI server out there
  • 100% WSGI compliant (except for the write callback design mistake)

Usage

bjoern.run(wsgi_application, host, port)

# alternatively, the mainloop can be run separately:
bjoern.listen(wsgi_application, host, port)
bjoern.run()

But what about...

Fapws3?

Sucks. Really, the code is an incredible mess. It likes to segfault.

I tried to patch Fapws so that it would support threading, but after about two hours of brain slime feeling, I decided to write my own WSGI server -- "Fapws done right".

gunicorn?

bjoern is about 5 times faster. Plus gunicorn is too much bloated.

uWSGI?

Awesome project, but way too much bloat.

meinheld?

Unfortunately now bloated with gunicorn and coroutine/greenlet crap, seemed to be a very nice server at first.

$SERVER?

Probably too much bloat, too slow, does not scale, buggy, ...

About

A screamingly fast Python WSGI server written in C.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 87.7%
  • Python 12.3%