Hornbeam Documentation

Hornbeam is an HTTP server and application server that combines Python’s web and AI capabilities with Erlang’s infrastructure:

  • Python handles: Web apps (WSGI/ASGI), ML models, data processing
  • Erlang handles: Scaling, concurrency, distribution, fault tolerance, shared state

Getting Started

Guides

Examples

Reference

Why Hornbeam?

ChallengeTraditional PythonHornbeam
Concurrent connections~1000s (GIL)Millions (BEAM)
Distributed computingRedis/RabbitMQBuilt-in Erlang RPC
Shared stateExternal databaseETS (in-memory)
Hot reloadRestart serverLive code swap
Fault toleranceProcess crashes = downSupervisor restarts

v1.4.0 Highlights

  • Erlang-Asyncio Integration: Native Erlang timer support for asyncio.sleep() with 86x improvement
  • 6-Stage Optimizations: Per-app execution mode caching, request-local queues, event-driven WebSocket wakeups
  • ~71k req/s at high concurrency (500 connections)

See the ASGI Guide and Benchmarking for details.

Erlang Python Integration

Hornbeam is built on Erlang Python, which provides:

  • Bidirectional Erlang ↔ Python calls
  • Sub-interpreters for true parallelism
  • Free-threaded Python (3.13+) support
  • Automatic type conversion
  • Streaming from generators
  • Erlang-native asyncio event loop

See the Erlang Python documentation for low-level Python integration details.