# Bandit

> A pure-Elixir HTTP server built for Plug and WebSock apps

Source: https://talira.ai/catalog/bandit-pgbfc2ka
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [web servers / application servers](https://talira.ai/categories/web-servers/application-servers), [languages / elixir](https://talira.ai/categories/languages/elixir)
- Licence: MIT[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Mat Trudel](https://talira.ai/orgs/mat-trudel.md)

Bandit is an HTTP server for [Plug](https://talira.ai/catalog/plug-em53kn6h.md) 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](https://talira.ai/catalog/phoenix-pr0aa2gd.md) since 1.7.11, and its README says any Phoenix or Plug app should work with it as a drop-in replacement for [Cowboy](https://talira.ai/catalog/cowboy-edtr4jzc.md).

## Links

- GitHub: https://github.com/mtrudel/bandit
- Docs: https://bandit.hexdocs.pm

## 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

## Trust

Overall: 0.64 out of 1.
Signals: maintenance 1.00, adoption 0.66, momentum 0.42, community 0.73, backing 0.30, extensibility 0.00.

- last commit 13 days ago
- 71 commits in the last 90 days
- 1.9k GitHub stars
- 65 contributors
- backed by Mat Trudel

## Related

- Works with [Plug](https://talira.ai/catalog/plug-em53kn6h.md)
- Works with [Phoenix](https://talira.ai/catalog/phoenix-pr0aa2gd.md)
- Based on [Thousand Island](https://talira.ai/catalog/thousand-island-4tw7vrdd.md)

## Alternatives

- [Cowboy](https://talira.ai/catalog/cowboy-edtr4jzc.md): Small, fast HTTP server for Erlang/OTP with HTTP/2, WebSocket and REST
- [Plug.Cowboy](https://talira.ai/catalog/plug-cowboy-cenn7jrk.md): Run Plug and Phoenix apps on the Cowboy web server

## Sources

[^1]: https://github.com/mtrudel/bandit/blob/main/LICENSE (checked 29 Nov 2026)
[^2]: https://github.com/mtrudel/bandit/blob/main/mix.exs (checked 29 Nov 2026)
