Choose a server engine¶
Katalyst runs on any of three Ktor server engines: Netty, Jetty, or CIO. You select one in
the bootstrap by passing the engine object to engine(...).
katalyst-starter-web already bundles the Netty engine, so the default needs no extra
dependency. To run on Jetty or CIO instead, add that engine's module — its version is
managed by the BOM, so you omit the version — and the matching Ktor engine arrives
transitively.
Select an engine¶
Each of NettyServer, JettyServer, and CioServer is an object implementing
KatalystServerEngine, so swapping engines is a one-line change in the bootstrap (plus the
engine module for non-default engines).
Which one¶
| Engine | Notes |
|---|---|
| Netty | The common default for production HTTP services. |
| Jetty | Servlet-based; useful in Jetty-aligned environments. Honors maxThreads / minThreads in the deployment config. |
| CIO | Coroutine-based pure-Kotlin engine with no extra native dependencies. |
Configure the engine¶
Engine-level settings (host, port, thread pools, timeouts, TLS) come from the
ktor.deployment block when you enable server tuning:
The deployment keys, including which are engine-specific, are documented in the configuration reference.
Related¶
- Application DSL reference — the
engine(...)block. - Configure with YAML — the server deployment block.