A pure-Elixir HTTP server built for Plug and WebSock apps
open sourceMITfree
Bandit is an HTTP server for Plug and WebSock apps, written entirely in Elixir on top of Thousand Island. It serves HTTP/1.x, HTTP/2 and WebSocket clients over HTTP and HTTPS, with gzip and deflate compression and per-message WebSocket compression, and its HTTP/2 and WebSocket code pass the h2spec and Autobahn conformance suites. It's been the default HTTP server for Phoenix since 1.7.11, and its README says any Phoenix or Plug app should work with it as a drop-in replacement for Cowboy.
Problems it solves
- serve my Phoenix app over HTTP/2 without Cowboy
- run a Plug app with WebSockets on a server written in pure Elixir
- swap my Elixir web server for a faster one without changing my app
Features
- HTTP/1.x, HTTP/2 and WebSockets over HTTP and HTTPS
- complete Plug and WebSock API support
- gzip and deflate content encoding, WebSocket per-message compression
- 100% on the h2spec and Autobahn conformance suites
- default HTTP server for Phoenix since 1.7.11
Alternatives
The same job
These do what Bandit does.
- Cowboy Small, fast HTTP server for Erlang/OTP with HTTP/2, WebSocket and REST
- Plug.Cowboy Run Plug and Phoenix apps on the Cowboy web server
