Hex.pm Hex Docs License

Malla is a framework for developing distributed services in Elixir. It simplifies distributed service development through a plugin-based architecture with compile-time callback chaining, automatic service discovery across nodes, and minimal "magic" to keep systems understandable.

Not just for distributed systems — even on a single node, Malla gives you plugin-based service management, runtime plugin control (add, remove, or reconfigure without restarting), lifecycle management, and built-in observability. Distribution is there when you need it.

Why Malla?

  • Simplicity first — straightforward, readable code over clever abstractions. Compile-time callback chains mean no runtime complexity.
  • Safe evolution — add or modify behavior through plugins without touching existing code. Deactivate problematic plugins on the fly without restarting.
  • No lock-in — integrates incrementally with your existing codebase. All plugins are optional. Start with a single service and expand gradually.

Built on years of production experience running critical systems.

At a Glance

  • Plugin-based architecture with compile-time callback chaining (zero runtime overhead)
  • Runtime plugin management — add, remove, and reconfigure plugins on the fly
  • Automatic service discovery across the cluster
  • Service lifecycle control with admin and running statuses
  • No lock-in — integrates incrementally with your existing codebase

See our Livebook's Getting Started Tutorial and Distributed Tutorial!

Documentation

Full documentation is available on HexDocs.

Getting Started

GuideDescription
IntroductionWhy Malla, core concepts, and key principles
Quick StartCreate your first service in minutes
Getting started tutorialInteractive LiveBook tutorial
Distributed TutorialMulti-node LiveBook tutorial

Core Concepts

GuideDescription
ServicesService fundamentals and the defcb macro
PluginsThe plugin system and callback chains
CallbacksHow callback chaining works
LifecycleService states and transitions
ConfigurationMulti-layer configuration with deep merging

Distribution and Operations

GuideDescription
Cluster SetupSetting up a distributed cluster
Service DiscoveryAutomatic discovery across nodes
Remote CallsTransparent RPC with failover
TracingInstrumentation and observability
Plugin DevelopmentCreating custom plugins

Part of the NetKubes Platform

Malla is the foundation of NetKubes, a platform for building complex, distributed, production-ready Elixir applications. We will be releasing a series of plugins and tools covering deployment (Kubernetes and other platforms), runtime management, tracing, and common infrastructure needs. Malla works perfectly as a standalone framework — NetKubes plugins simply extend it when you need more.

AI-Assisted Development

Malla ships with instruction files for AI coding assistants. If you use Malla as a dependency, add this to your project's AI instruction file:

ToolFileAdd this line
Claude CodeCLAUDE.md@deps/malla/priv/ai/AGENTS.md
OpenAI CodexAGENTS.md@deps/malla/priv/ai/AGENTS.md
Cursor.cursor/rules/malla.mdCopy contents of deps/malla/priv/ai/AGENTS.md

Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request.

License

Malla is released under the Apache 2.0 License. See the LICENSE file for details.