1 Answer
- Newest
- Most votes
- Most comments
3
Below are some pratice you can take as reference:
- Handling Large BSON Documents • Split Large Documents: If possible, consider splitting large MongoDB documents into smaller sub-documents before migration. This can be done programmatically using MongoDB's aggregation framework or custom scripts. • Use LOB Mode: AWS DMS supports migrating large objects (LOBs) by enabling LOB mode. You can adjust the LobChunkSize and MaxLobSize parameters to handle large BSON documents more effectively. • Enable Compression: Compressing the data before migration can help reduce the size of BSON documents.
- Adjusting DMS Settings • NestingLevel: If your documents are deeply nested, consider using "NestingLevel": "one" instead of "none". This can help flatten the structure and reduce size issues. • Task Settings: Fine-tune the CdcMinFileSize and CdcMaxBatchInterval values to optimize the CDC process for large documents. • Output Format: Switching to JSON instead of Parquet might simplify the migration process, as JSON is more flexible with document structures.
- Alternative AWS Services • AWS DataSync: For large datasets, AWS DataSync can be a better alternative. It supports high-speed data transfers and can handle large files efficiently. • MongoDB Atlas Data Federation: If you're using MongoDB Atlas, you can leverage its Data Federation feature to export data directly to S3 in Parquet format. • AWS Snowball: For extremely large datasets, AWS Snowball provides a physical device for secure data transfer to S3.
- Segmentation for Performance • Use segmentation to improve performance during migration. AWS DMS supports auto-segmentation and range segmentation for MongoDB collections, which can help distribute the load and avoid bottlenecks.
- Error Handling and Monitoring • Implement robust error handling to retry failed migrations. • Use AWS CloudWatch to monitor DMS tasks and identify potential issues early.
Relevant content
- asked 2 months ago
- asked 2 years ago
- asked 4 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago