dawdler.* Configuration Reference
1. Unified configuration entry point
All of the framework's own dawdler.* configuration items are read through club.dawdler.util.DawdlerConfig, with the following precedence (highest to lowest):
- -D JVM parameters:
-Ddawdler.max.frame.length=16777216 - Environment variables: the key mapping rule is that the
dawdler.prefix becomesDAWDLER_, and the remaining dots and hyphens become underscores and are upper-cased, e.g.dawdler.max.frame.lengthbecomesDAWDLER_MAX_FRAME_LENGTH - The
properties:section of dawdler-config.yml (supports multi-environment profiles, fallback to the unified configuration center,${}placeholders andENC()encryption, coexisting with the configuration center's client section) - Code default values
# dawdler-config.yml
snapshot-id: my-app # Existing reserved key
consul: # Existing configuration center client section
host: 127.0.0.1
properties: # Unified carrier section for dawdler.*
dawdler.max.frame.length: 16777216
dawdler.serializer.jdk.max.depth: 512
dawdler.server.metrics.enabled: true
Notes:
dawdler.profiles.activeis a bootstrap parameter that can only be passed via-D(read dynamically on every resource load) and does not take part in the precedence above.- The vast majority of configuration items are read once at class load and frozen (
read timing: static); after changing the configuration the process must be restarted. Items markedread timing: per-callare read dynamically on every call. - After hot-updating the
properties:section from the configuration center, newly created sessions/instances read the new values, while frozen static values are not rewritten. - When
dawdler-config.ymlfails to load, the framework degrades to "-D and environment variables only", outputs a WARN and does not block startup.
2. Configuration item list
Default values are the values used when nothing is configured from any source. Side: server = server side, client = web side (RPC client), gateway = gateway, all = all sides.
2.1 Common (framework core)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.max.frame.length | int | 8388608 (8MB) | static | all | dawdler-core | Upper bound on a data frame's declared length; connections exceeding it are closed |
| dawdler.max.decompressed.length | long | 67108864 (64MB) | static | all | dawdler-core | Upper bound on the length of a frame after decompression, guarding against decompression bombs |
| dawdler.date.format | string | yyyy-MM-dd | static | all | dawdler-util | DateUtil default date format |
| dawdler.datetime.format | string | yyyy-MM-dd HH:mm:ss | static | all | dawdler-util | DateUtil default date-time format |
| dawdler.time.format | string | HH:mm:ss | static | all | dawdler-util | DateUtil default time format |
2.2 Sessions and networking (dawdler-core)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.core.read.stall.timeout | long(ms) | 5000 | static | all | dawdler-core | Session read stall threshold |
| dawdler.core.read.frame.timeout | long(ms) | 30000 | static | all | dawdler-core | Timeout for reading a whole frame |
| dawdler.core.read.inflight.max.bytes | long(B) | min(256MB, maxHeap/4), 0=unlimited | static | all | dawdler-core | Global in-flight byte budget for incomplete frames |
| dawdler.core.read.inflight.max.bytes.per.ip | long(B) | derived (global/8, minimum 1MB), 0=unlimited | static | all | dawdler-core | Per-IP in-flight byte budget for incomplete frames |
| dawdler.core.write.stall.timeout | long(ms) | 10000 | static | all | dawdler-core | Timeout for a single asynchronous write |
| dawdler.core.write.acquire.timeout | long(ms) | 30000 | static | all | dawdler-core | Upper bound on waiting for a write queue permit |
| dawdler.core.write.queue.max.bytes | int(B) | 8388608 (8MB), minimum 1024 | static | all | dawdler-core | Byte limit of a single session's write queue |
| dawdler.core.idle.writer.millis | long(ms) | 8000 | static | all | dawdler-core | Write idle detection period |
| dawdler.core.idle.reader.millis | long(ms) | writer×15 | static | all | dawdler-core | Read idle detection period |
| dawdler.core.session.buffer.pool.max.idle | int | 64 | static | all | dawdler-core | Idle upper bound per tier of the session direct buffer pool, 0=no pooling |
2.3 Serialization (dawdler-serialization)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.serializer.kryo.secure.enabled | boolean | true | static | all | dawdler-serialization | Kryo allowlist mode switch |
| dawdler.serializer.kryo.whitelist.packages | csv | built-in allowlist | static | all | dawdler-serialization | Kryo allowlisted package prefixes, appended comma-separated |
| dawdler.serializer.kryo.blacklist.classes | csv | built-in denylist | static | all | dawdler-serialization | Kryo denylisted concrete class names, appended comma-separated |
| dawdler.serializer.kryo.outputRetainLimit | int | 65536 (64KB) | static | all | dawdler-serialization | Kryo output buffer retention limit |
| dawdler.serializer.kryo.directPayload.enabled | boolean | true | static | all | dawdler-serialization | Kryo direct off-heap write switch; false uses the heap path |
| dawdler.serializer.kryo.debugSlotTrack | boolean | false | static | all | dawdler-serialization | Kryo slot ownership debug tracking |
| dawdler.serializer.jdk.secure.enabled | boolean | true | static | all | dawdler-serialization | JDK deserialization strict allowlist switch (JEP 290) |
| dawdler.serializer.jdk.whitelist.packages | csv | built-in allowlist | static | all | dawdler-serialization | JDK deserialization allowlisted package prefixes, appended |
| dawdler.serializer.jdk.blacklist.classes | csv | built-in denylist | static | all | dawdler-serialization | JDK deserialization denylisted concrete class names, appended |
| dawdler.serializer.jdk.max.depth | int | 256 | static | all | dawdler-serialization | JDK deserialization maximum object depth |
| dawdler.serializer.jdk.max.array.length | int | 10000000 | static | all | dawdler-serialization | JDK deserialization maximum array length |
| dawdler.serializer.jdk.max.refs | long | 1000000 | static | all | dawdler-serialization | JDK deserialization maximum reference count |
| dawdler.core.payload.pool.per.slot | int | 4 | static | all | dawdler-serialization | Number of idle blocks per tier of the payload off-heap pool |
| dawdler.core.payload.pool.max.active.bytes | long(B) | min(512MB, maxHeap/2) | static | all | dawdler-serialization | Payload pool in-flight byte budget on the write side |
| dawdler.core.payload.pool.borrow.timeout | long(ms) | 30000 | static | all | dawdler-serialization | Upper bound on waiting for the payload pool budget |
2.4 Server side (dawdler-server)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.server.metrics.enabled | boolean | false | static | server | dawdler-server | Server metrics switch; zero overhead when disabled |
| dawdler.server.metrics.latency.window | int | 1024 | static | server | dawdler-server | Window length of the latency ring histogram |
| dawdler.server.graceful.timeout | long(ms) | 30000 | static | server | dawdler-server | Graceful shutdown wait upper bound |
| dawdler.server.shutdown.poolAwaitTimeout | long(ms) | 10000 | static | server | dawdler-server | await timeout for the shutdown thread pool |
| dawdler.server.acceptor.rearmRetryDelayMillis | long(ms) | 1000 | per-call | server | dawdler-server | acceptor retry delay |
| dawdler.server.health.liveUri | string | /live | static | server | dawdler-server | Liveness probe endpoint uri (200 as soon as the process is alive, no component checks) |
| dawdler.server.health.readyUri | string | /ready | static | server | dawdler-server | Readiness probe endpoint uri (probe state + aggregated component health, 503 drains traffic) |
2.5 Client (dawdler-client)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.client.virtualThread.enabled | boolean | false | static | client | dawdler-client | Use virtual threads for the client IO thread group; must be set before the first connection is established |
| dawdler.client.await.available.timeout | long(s) | 5 | static | client | dawdler-client | Upper bound (seconds) on waiting for an available session |
| dawdler.client.graceful.close.timeout | long(ms) | 30000 | static | client | dawdler-client | Client graceful close wait upper bound |
| dawdler.client.metrics.enabled | boolean | false | static | client | dawdler-client | Client metrics switch |
| dawdler.client.metrics.latency.window | int | 1024 | static | client | dawdler-client | Window length of the latency ring histogram |
2.6 Web side (dawdler-client-plug-web)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.web.metrics.enabled | boolean | false | static | client | dawdler-client-plug-web | HTTP metrics switch |
| dawdler.web.metrics.latency.window | int | 1024 | static | client | dawdler-client-plug-web | Window length of the latency ring histogram |
| dawdler.web.metrics.maxUriCardinality | int | 1000 | static | client | dawdler-client-plug-web | Upper bound on URI counter cardinality |
| dawdler.web.accept.cache.maxSize | int | 256 | static | client | dawdler-client-plug-web | Capacity of the Accept parsing cache |
| dawdler.bind.max-nested-depth | int | 3 | static | client | dawdler-client-plug-web | Maximum nesting depth for parameter binding |
| dawdler.web.health.liveUri | string | /live | static | client | dawdler-client-plug-web | Liveness probe endpoint uri (200 as soon as the process is alive, no component checks) |
| dawdler.web.health.readyUri | string | /ready | static | client | dawdler-client-plug-web | Readiness probe endpoint uri (probe state + aggregated component health, 503 drains traffic) |
2.7 Gateway (dawdler-web-gateway)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.gateway.metrics.latency.window | int | 1024 | static | gateway | dawdler-web-gateway | Window length of the latency ring histogram |
| dawdler.gateway.metrics.maxRouteCardinality | int | 1000 | static | gateway | dawdler-web-gateway | Upper bound on route counter cardinality |
| dawdler.gateway.rewrite.complexityCheck | boolean | true | static | gateway | dawdler-web-gateway | Regex complexity check for route rewriting; false disables it |
2.8 Cache (dawdler-cache-plug)
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.cache.singleflight.waitMillis | long(ms) | 10000 | static | all | dawdler-cache-core | Single-flight wait upper bound |
| dawdler.cache.singleflight.loadLockTtlMillis | long(ms) | 30000 | static | all | dawdler-cache-core | Single-flight load lock TTL |
| dawdler.cache.error.log.intervalMillis | long(ms) | 10000 | static | all | dawdler-cache-core | Throttle interval for cache exception logs |
2.9 rabbitmq (dawdler-rabbitmq-plug)
The keys below take precedence over the same-named keys in {name}.properties (compensationConfirmTimeoutMillis, etc.) when passed via -D/environment variables/yml; when all are missing the defaults are used:
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.rabbitmq.compensationConfirmTimeoutMillis | long(ms) | 5000 | per-call | all | dawdler-rabbitmq-core | Confirmation timeout for the publish of a consumption-failure compensation |
| dawdler.rabbitmq.publishRetry.maxTimes | int | 3 | per-call | all | dawdler-rabbitmq-core | Maximum retries for a failed publish |
| dawdler.rabbitmq.publishRetry.baseDelayMillis | long(ms) | 1000 | per-call | all | dawdler-rabbitmq-core | Base backoff delay for retries |
| dawdler.rabbitmq.publishRetry.confirmTimeoutMillis | long(ms) | 5000 | per-call | all | dawdler-rabbitmq-core | Timeout for a retried publish to be confirmed |
2.10 Registry and configuration center
| Key | Type | Default | Read timing | Side | Module | Description |
|---|---|---|---|---|---|---|
| dawdler.discovery.center.type | string | none (falls back to discovery-center.properties) | per-call | all | dawdler-discovery-center-core | Registry type, e.g. zookeeper/consul |
| dawdler.config.refresh.strict | boolean | true | static | all | dawdler-config-center-core | Strict mode for configuration hot updates: when true a failed field injection throws |
| dawdler.config.snapshot.dir | string | {user.home}/.dawdler/config-snapshot | per-call | all | dawdler-config-center-core | Directory where configuration snapshots are persisted |