How can I use the DMS batch apply feature to improve CDC replication performance?
To Nha Notes | Oct. 19, 2022, 3:28 p.m.
Use cases for batch apply
You can use batch apply in the following circumstances:
- The task has a high number of transactions captured from the source and this is causing target latency.
- The task has a workload from source that is a combination of insert, update, and delete on the same rows.
- No requirement to keep strict referential integrity on the target (disabled FKs).
Limitations
Batch apply currently has the following limitations:
- The Amazon Redshift target uses batch apply, by default. The Amazon Simple Storage Service (Amazon S3) target is forced to use transactional apply.
- Batch apply can only work on tables with primary key/unique index. For tables with no primary key/unique index, bulk apply will only apply the insert in bulk mode, but performs updates and deletes one-by-one. If the table has primary key/unique index but one-by-one mode switched is observed, see How can I troubleshoot why Amazon Redshift switched to one-by-one mode because a bulk operation failed during an AWS DMS task?
- When LOB columns are included in the replication, you can use BatchApplyEnabled in limited LOB mode, only. For more information, see Target metadata task settings.
- When BatchApplyEnabled is set to true, AWS DMS generates an error message if a target table has a unique constraint.
References
https://aws.amazon.com/premiumsupport/knowledge-center/dms-batch-apply-cdc-replication/