Amazon DocumentDB (with MongoDB compatibility) now supports retryable writes
Amazon DocumentDB now supports retryable writes for MongoDB-compatible applications, enhancing resilience against transient errors without code changes.
Amazon DocumentDB (with MongoDB compatibility) has introduced support for retryable writes starting with engine version 8.0.2. This feature automatically retries certain write operations once if a transient error occurs, such as network interruptions or primary failovers. Developers no longer need to modify application code or set retryWrites=false in the connection string to avoid errors. The capability simplifies error handling by integrating retry logic directly into the MongoDB driver.
Retryable writes are enabled by default in most current MongoDB-compatible drivers, and this release extends that functionality to Amazon DocumentDB. Applications can now rely on the driver to handle transient failures without additional configuration. The feature applies to all write commands except updateMany, deleteMany, and transaction commit or abort operations. This ensures broader compatibility while maintaining stability for critical operations.
The new support is available on Amazon DocumentDB 8.0.2 instance-based and serverless clusters across all regions where Amazon DocumentDB 8.0 is offered. Users can immediately leverage retryable writes without upgrading existing clusters, provided they are running engine version 8.0.2. Earlier versions remain unsupported for this feature and require disabling retryable writes to avoid issues.
To implement retryable writes, developers can refer to the Amazon DocumentDB developer guide for detailed instructions. The feature aims to reduce downtime and improve application reliability by minimizing the impact of temporary disruptions. This enhancement aligns with best practices for building resilient MongoDB-compatible applications on Amazon DocumentDB.