Skip to main content

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):

  1. -D JVM parameters: -Ddawdler.max.frame.length=16777216
  2. Environment variables: the key mapping rule is that the dawdler. prefix becomes DAWDLER_, and the remaining dots and hyphens become underscores and are upper-cased, e.g. dawdler.max.frame.length becomes DAWDLER_MAX_FRAME_LENGTH
  3. The properties: section of dawdler-config.yml (supports multi-environment profiles, fallback to the unified configuration center, ${} placeholders and ENC() encryption, coexisting with the configuration center's client section)
  4. 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.active is 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 marked read timing: per-call are 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.yml fails 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)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.max.frame.lengthint8388608 (8MB)staticalldawdler-coreUpper bound on a data frame's declared length; connections exceeding it are closed
dawdler.max.decompressed.lengthlong67108864 (64MB)staticalldawdler-coreUpper bound on the length of a frame after decompression, guarding against decompression bombs
dawdler.date.formatstringyyyy-MM-ddstaticalldawdler-utilDateUtil default date format
dawdler.datetime.formatstringyyyy-MM-dd HH:mm:ssstaticalldawdler-utilDateUtil default date-time format
dawdler.time.formatstringHH:mm:ssstaticalldawdler-utilDateUtil default time format

2.2 Sessions and networking (dawdler-core)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.core.read.stall.timeoutlong(ms)5000staticalldawdler-coreSession read stall threshold
dawdler.core.read.frame.timeoutlong(ms)30000staticalldawdler-coreTimeout for reading a whole frame
dawdler.core.read.inflight.max.byteslong(B)min(256MB, maxHeap/4), 0=unlimitedstaticalldawdler-coreGlobal in-flight byte budget for incomplete frames
dawdler.core.read.inflight.max.bytes.per.iplong(B)derived (global/8, minimum 1MB), 0=unlimitedstaticalldawdler-corePer-IP in-flight byte budget for incomplete frames
dawdler.core.write.stall.timeoutlong(ms)10000staticalldawdler-coreTimeout for a single asynchronous write
dawdler.core.write.acquire.timeoutlong(ms)30000staticalldawdler-coreUpper bound on waiting for a write queue permit
dawdler.core.write.queue.max.bytesint(B)8388608 (8MB), minimum 1024staticalldawdler-coreByte limit of a single session's write queue
dawdler.core.idle.writer.millislong(ms)8000staticalldawdler-coreWrite idle detection period
dawdler.core.idle.reader.millislong(ms)writer×15staticalldawdler-coreRead idle detection period
dawdler.core.session.buffer.pool.max.idleint64staticalldawdler-coreIdle upper bound per tier of the session direct buffer pool, 0=no pooling

2.3 Serialization (dawdler-serialization)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.serializer.kryo.secure.enabledbooleantruestaticalldawdler-serializationKryo allowlist mode switch
dawdler.serializer.kryo.whitelist.packagescsvbuilt-in allowliststaticalldawdler-serializationKryo allowlisted package prefixes, appended comma-separated
dawdler.serializer.kryo.blacklist.classescsvbuilt-in denyliststaticalldawdler-serializationKryo denylisted concrete class names, appended comma-separated
dawdler.serializer.kryo.outputRetainLimitint65536 (64KB)staticalldawdler-serializationKryo output buffer retention limit
dawdler.serializer.kryo.directPayload.enabledbooleantruestaticalldawdler-serializationKryo direct off-heap write switch; false uses the heap path
dawdler.serializer.kryo.debugSlotTrackbooleanfalsestaticalldawdler-serializationKryo slot ownership debug tracking
dawdler.serializer.jdk.secure.enabledbooleantruestaticalldawdler-serializationJDK deserialization strict allowlist switch (JEP 290)
dawdler.serializer.jdk.whitelist.packagescsvbuilt-in allowliststaticalldawdler-serializationJDK deserialization allowlisted package prefixes, appended
dawdler.serializer.jdk.blacklist.classescsvbuilt-in denyliststaticalldawdler-serializationJDK deserialization denylisted concrete class names, appended
dawdler.serializer.jdk.max.depthint256staticalldawdler-serializationJDK deserialization maximum object depth
dawdler.serializer.jdk.max.array.lengthint10000000staticalldawdler-serializationJDK deserialization maximum array length
dawdler.serializer.jdk.max.refslong1000000staticalldawdler-serializationJDK deserialization maximum reference count
dawdler.core.payload.pool.per.slotint4staticalldawdler-serializationNumber of idle blocks per tier of the payload off-heap pool
dawdler.core.payload.pool.max.active.byteslong(B)min(512MB, maxHeap/2)staticalldawdler-serializationPayload pool in-flight byte budget on the write side
dawdler.core.payload.pool.borrow.timeoutlong(ms)30000staticalldawdler-serializationUpper bound on waiting for the payload pool budget

2.4 Server side (dawdler-server)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.server.metrics.enabledbooleanfalsestaticserverdawdler-serverServer metrics switch; zero overhead when disabled
dawdler.server.metrics.latency.windowint1024staticserverdawdler-serverWindow length of the latency ring histogram
dawdler.server.graceful.timeoutlong(ms)30000staticserverdawdler-serverGraceful shutdown wait upper bound
dawdler.server.shutdown.poolAwaitTimeoutlong(ms)10000staticserverdawdler-serverawait timeout for the shutdown thread pool
dawdler.server.acceptor.rearmRetryDelayMillislong(ms)1000per-callserverdawdler-serveracceptor retry delay
dawdler.server.health.liveUristring/livestaticserverdawdler-serverLiveness probe endpoint uri (200 as soon as the process is alive, no component checks)
dawdler.server.health.readyUristring/readystaticserverdawdler-serverReadiness probe endpoint uri (probe state + aggregated component health, 503 drains traffic)

2.5 Client (dawdler-client)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.client.virtualThread.enabledbooleanfalsestaticclientdawdler-clientUse virtual threads for the client IO thread group; must be set before the first connection is established
dawdler.client.await.available.timeoutlong(s)5staticclientdawdler-clientUpper bound (seconds) on waiting for an available session
dawdler.client.graceful.close.timeoutlong(ms)30000staticclientdawdler-clientClient graceful close wait upper bound
dawdler.client.metrics.enabledbooleanfalsestaticclientdawdler-clientClient metrics switch
dawdler.client.metrics.latency.windowint1024staticclientdawdler-clientWindow length of the latency ring histogram

2.6 Web side (dawdler-client-plug-web)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.web.metrics.enabledbooleanfalsestaticclientdawdler-client-plug-webHTTP metrics switch
dawdler.web.metrics.latency.windowint1024staticclientdawdler-client-plug-webWindow length of the latency ring histogram
dawdler.web.metrics.maxUriCardinalityint1000staticclientdawdler-client-plug-webUpper bound on URI counter cardinality
dawdler.web.accept.cache.maxSizeint256staticclientdawdler-client-plug-webCapacity of the Accept parsing cache
dawdler.bind.max-nested-depthint3staticclientdawdler-client-plug-webMaximum nesting depth for parameter binding
dawdler.web.health.liveUristring/livestaticclientdawdler-client-plug-webLiveness probe endpoint uri (200 as soon as the process is alive, no component checks)
dawdler.web.health.readyUristring/readystaticclientdawdler-client-plug-webReadiness probe endpoint uri (probe state + aggregated component health, 503 drains traffic)

2.7 Gateway (dawdler-web-gateway)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.gateway.metrics.latency.windowint1024staticgatewaydawdler-web-gatewayWindow length of the latency ring histogram
dawdler.gateway.metrics.maxRouteCardinalityint1000staticgatewaydawdler-web-gatewayUpper bound on route counter cardinality
dawdler.gateway.rewrite.complexityCheckbooleantruestaticgatewaydawdler-web-gatewayRegex complexity check for route rewriting; false disables it

2.8 Cache (dawdler-cache-plug)​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.cache.singleflight.waitMillislong(ms)10000staticalldawdler-cache-coreSingle-flight wait upper bound
dawdler.cache.singleflight.loadLockTtlMillislong(ms)30000staticalldawdler-cache-coreSingle-flight load lock TTL
dawdler.cache.error.log.intervalMillislong(ms)10000staticalldawdler-cache-coreThrottle 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:

KeyTypeDefaultRead timingSideModuleDescription
dawdler.rabbitmq.compensationConfirmTimeoutMillislong(ms)5000per-callalldawdler-rabbitmq-coreConfirmation timeout for the publish of a consumption-failure compensation
dawdler.rabbitmq.publishRetry.maxTimesint3per-callalldawdler-rabbitmq-coreMaximum retries for a failed publish
dawdler.rabbitmq.publishRetry.baseDelayMillislong(ms)1000per-callalldawdler-rabbitmq-coreBase backoff delay for retries
dawdler.rabbitmq.publishRetry.confirmTimeoutMillislong(ms)5000per-callalldawdler-rabbitmq-coreTimeout for a retried publish to be confirmed

2.10 Registry and configuration center​

KeyTypeDefaultRead timingSideModuleDescription
dawdler.discovery.center.typestringnone (falls back to discovery-center.properties)per-callalldawdler-discovery-center-coreRegistry type, e.g. zookeeper/consul
dawdler.config.refresh.strictbooleantruestaticalldawdler-config-center-coreStrict mode for configuration hot updates: when true a failed field injection throws
dawdler.config.snapshot.dirstring{user.home}/.dawdler/config-snapshotper-callalldawdler-config-center-coreDirectory where configuration snapshots are persisted