QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides handle-to-DID resolution with Redis-backed caching and queue processing.

documentation: configuration updates

+10 -3
README.md
··· 2 2 3 3 QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides blazing-fast handle-to-DID resolution with intelligent caching strategies, supporting both in-memory and Redis-backed persistent caching with binary serialization for optimal storage efficiency. 4 4 5 + Built with minimal dependencies and optimized for production use, QuickDID delivers exceptional performance while maintaining a lean footprint. 6 + 5 7 ## ⚠️ Production Disclaimer 6 8 7 9 **This project is a release candidate and has not been fully vetted for production use.** While it includes comprehensive error handling and has been designed with production features in mind, more thorough testing is necessary before deploying in critical environments. Use at your own risk and conduct appropriate testing for your use case. ··· 11 13 - **Fast Handle Resolution**: Resolves AT Protocol handles to DIDs using DNS TXT records and HTTP well-known endpoints 12 14 - **Multi-Layer Caching**: In-memory caching with configurable TTL and Redis-backed persistent caching (90-day TTL) 13 15 - **Binary Serialization**: Compact storage format reduces cache size by ~40% compared to JSON 14 - - **Queue Processing**: Asynchronous handle resolution with support for MPSC and Redis queue adapters 16 + - **Queue Processing**: Asynchronous handle resolution with support for MPSC, Redis, and no-op queue adapters 15 17 - **AT Protocol Compatible**: Implements XRPC endpoints for seamless integration with AT Protocol infrastructure 16 18 - **Comprehensive Error Handling**: Includes health checks and graceful shutdown support 19 + - **Minimal Dependencies**: Optimized dependency tree for faster compilation and reduced attack surface 20 + - **Predictable Worker IDs**: Simple default worker identification for distributed deployments 17 21 18 22 ## Building 19 23 ··· 58 62 59 63 This will start QuickDID with: 60 64 - HTTP server on port 8080 (default) 61 - - In-memory caching only 65 + - In-memory caching only (300-second TTL) 62 66 - MPSC queue adapter for async processing 67 + - Default worker ID: "worker1" 63 68 - Connection to plc.directory for DID resolution 64 69 65 70 ### Optional Configuration ··· 68 73 69 74 - `HTTP_PORT`: Server port (default: 8080) 70 75 - `REDIS_URL`: Redis connection URL for persistent caching (e.g., `redis://localhost:6379`) 71 - - `QUEUE_ADAPTER`: Queue type - 'mpsc' or 'redis' (default: mpsc) 76 + - `QUEUE_ADAPTER`: Queue type - 'mpsc', 'redis', or 'noop' (default: mpsc) 77 + - `QUEUE_WORKER_ID`: Worker identifier for distributed queue processing (default: worker1) 72 78 - `PLC_HOSTNAME`: PLC directory hostname (default: plc.directory) 73 79 - `RUST_LOG`: Logging level (e.g., debug, info, warn, error) 74 80 ··· 80 86 HTTP_PORT=3000 \ 81 87 REDIS_URL=redis://localhost:6379 \ 82 88 QUEUE_ADAPTER=redis \ 89 + QUEUE_WORKER_ID=prod-worker-1 \ 83 90 RUST_LOG=info \ 84 91 ./target/release/quickdid 85 92 ```
+7 -3
docs/configuration-reference.md
··· 241 241 **Required**: No 242 242 **Type**: String 243 243 **Default**: `mpsc` 244 - **Values**: `mpsc`, `redis`, `noop` 244 + **Values**: `mpsc`, `redis`, `noop`, `none` 245 245 246 246 The type of queue adapter for background handle resolution. 247 247 ··· 249 249 - `mpsc`: In-memory multi-producer single-consumer queue (default) 250 250 - `redis`: Redis-backed distributed queue 251 251 - `noop`: Disable queue processing (testing only) 252 + - `none`: Alias for `noop` 252 253 253 254 **Examples**: 254 255 ```bash ··· 260 261 261 262 # Testing without background processing 262 263 QUEUE_ADAPTER=noop 264 + 265 + # Alternative syntax for disabling 266 + QUEUE_ADAPTER=none 263 267 ``` 264 268 265 269 ### `QUEUE_REDIS_URL` ··· 325 329 326 330 **Required**: No 327 331 **Type**: String 328 - **Default**: Auto-generated UUID 332 + **Default**: `worker1` 329 333 330 334 Worker identifier for queue operations. Used in logs and monitoring. 331 335 ··· 420 424 QUEUE_ADAPTER=redis 421 425 QUEUE_REDIS_URL=redis://queue-redis:6379/0 422 426 QUEUE_REDIS_PREFIX=prod:queue: 423 - QUEUE_WORKER_ID=${HOSTNAME} 427 + QUEUE_WORKER_ID=${HOSTNAME:-worker1} 424 428 QUEUE_REDIS_TIMEOUT=10 425 429 426 430 # Performance
+4 -3
docs/production-deployment.md
··· 94 94 # QUEUE CONFIGURATION 95 95 # ---------------------------------------------------------------------------- 96 96 97 - # Queue adapter type: 'mpsc', 'redis', or 'noop' (default: mpsc) 97 + # Queue adapter type: 'mpsc', 'redis', 'noop', or 'none' (default: mpsc) 98 98 # - 'mpsc': In-memory queue for single-instance deployments 99 99 # - 'redis': Distributed queue for multi-instance or HA deployments 100 100 # - 'noop': Disable queue processing (testing only) 101 + # - 'none': Alias for 'noop' 101 102 QUEUE_ADAPTER=redis 102 103 103 104 # Redis URL for queue adapter (uses REDIS_URL if not set) ··· 114 115 # Higher = less polling overhead, slower shutdown 115 116 QUEUE_REDIS_TIMEOUT=5 116 117 117 - # Worker ID for Redis queue (auto-generated UUID if not set) 118 + # Worker ID for Redis queue (defaults to "worker1") 118 119 # Set this for predictable worker identification in multi-instance deployments 119 120 # Examples: worker-001, prod-us-east-1, $(hostname) 120 - # QUEUE_WORKER_ID=worker-001 121 + QUEUE_WORKER_ID=prod-worker-1 121 122 122 123 # Buffer size for MPSC queue (default: 1000) 123 124 # Range: 100-100000
+3 -2
src/config.rs
··· 94 94 CACHE_TTL_REDIS TTL for Redis cache in seconds (default: 7776000 = 90 days) 95 95 96 96 QUEUE CONFIGURATION: 97 - QUEUE_ADAPTER Queue adapter: 'mpsc', 'redis', 'noop' (default: mpsc) 97 + QUEUE_ADAPTER Queue adapter: 'mpsc', 'redis', 'noop', 'none' (default: mpsc) 98 98 QUEUE_REDIS_URL Redis URL for queue adapter (uses REDIS_URL if not set) 99 99 QUEUE_REDIS_PREFIX Redis key prefix for queues (default: queue:handleresolver:) 100 100 QUEUE_REDIS_TIMEOUT Queue blocking timeout in seconds (default: 5) 101 - QUEUE_WORKER_ID Worker ID for Redis queue (auto-generated UUID if not set) 101 + QUEUE_WORKER_ID Worker ID for Redis queue (default: worker1) 102 102 QUEUE_BUFFER_SIZE Buffer size for MPSC queue (default: 1000) 103 103 " 104 104 )] ··· 180 180 /// - "mpsc": In-memory multi-producer single-consumer queue 181 181 /// - "redis": Redis-backed distributed queue 182 182 /// - "noop": Disable queue processing (for testing) 183 + /// - "none": Alias for "noop" 183 184 /// 184 185 /// Default: "mpsc" for single-instance deployments 185 186 #[arg(long, env = "QUEUE_ADAPTER", default_value = "mpsc")]