Databases · Senior · Question 41 of 75
Why is a 'dual write' (write to the database, then publish to Kafka) risky, and what's the alternative?
- ✓Correct answer: One write can succeed and the other fail, leaving systems inconsistent; use the transactional outbox or CDC
- 2Dual writes are slower but always consistent
- 3Kafka can't receive data from Node.js
Explanation
The outbox stores the event in the same transaction as the change; a relay publishes it at least once. Consumers must be idempotent.