Skip to content

Microkernel (plug-in) architecture

A microkernel (or plug-in) architecture has two parts: a minimal core system that provides the essential, stable behavior, and plug-ins that add features through a defined contract. The core knows how to find, load and call plug-ins, but nothing about what each one does.

You use this style every day. Code editors and IDEs (VS Code, Eclipse, IntelliJ), web browsers, build servers like Jenkins and design tools all have a small core and a large ecosystem of extensions. It’s equally useful in business systems where the rules vary by customer, product, country or regulation, such as insurance claims, tax calculation, payroll or loan pricing.

(It’s named after, but distinct from, the microkernel in operating systems, which keeps only minimal services in the kernel and runs the rest outside it.)

A core system with plug-ins1. Users work with one product; the core handles the shared, stable workflow. 2. When behavior varies, for example claim rules by state, the core calls the plug-in registered for that case. 3. New plug-ins, including third-party ones, can be added without changing or redeploying the core. Usersone product Plug-in registrywhat's installed Core systemminimal, stable Plug-in contractinterfaces, versionsTexas rulesplug-inCalifornia rulesplug-inPartner plug-inthird-party123
A core system with plug-ins The core stays small and stable; variation lives in plug-ins that implement a shared contract and can be added without changing the core.
  1. Users work with one product; the core handles the shared, stable workflow.
  2. When behavior varies, for example claim rules by state, the core calls the plug-in registered for that case.
  3. New plug-ins, including third-party ones, can be added without changing or redeploying the core.
  • A minimal core. Only what every use needs: the main workflow, the plug-in loader, and shared services such as security, logging and configuration.
  • A plug-in contract. Interfaces (or message schemas) that plug-ins implement, plus metadata: name, version, which core versions it supports, and what it extends.
  • A registry. The core discovers which plug-ins are installed, from configuration, a directory, a database or a marketplace, and which one to use in each situation.
  • Connection styles. In-process (Java service loaders, OSGi, .NET assemblies, scripting engines), or remote (each plug-in is a service called over HTTP or messaging), which gives stronger isolation at the cost of latency.
  • Isolation. A faulty plug-in shouldn’t crash the core: sandboxing, timeouts, resource limits and the ability to disable a plug-in quickly.
  • Rules engines are a common case. A business rules engine is effectively a microkernel whose plug-ins are rule sets.
  • Extensibility: new features or variations without touching the core.
  • Customization per customer or market, with each variation isolated and testable.
  • Ecosystems: third parties can build on your product.
  • Stability: the core changes rarely, so it’s well tested and reliable.
  • The contract is hard to change: every plug-in depends on it, so breaking changes are very expensive.
  • Designing the core is hard: too small and plug-ins duplicate logic; too large and it stops being a microkernel.
  • Plug-in quality varies, especially from third parties, and can affect performance and security.
  • Testing combinations of core and plug-in versions grows quickly.
  • Products that need customer-, market- or regulation-specific behavior on a common workflow: insurance, tax, payroll, benefits eligibility, lending.
  • Platforms and tools meant to be extended by others.
  • Systems where a stable core and fast-changing rules have very different release cycles.
  • Systems without real variation; a plug-in mechanism adds indirection for no gain.
  • When the “plug-ins” need deep access to each other or to core internals, the boundary is in the wrong place.
  • A leaky contract that exposes core internals, so every core change breaks plug-ins.
  • No versioning of the contract, leaving no way to evolve it safely.
  • Plug-ins that depend on other plug-ins, recreating a tangled monolith around the core.
  • Business logic creeping back into the core “just this once” for one customer.
  • Untrusted plug-ins running with full privileges.

Glossary: coupling

Written and edited by Abhinav Taduka, enterprise software architect.