Data architecture review
Hãy nối upload → S3, catalog → cache/database, order → relational/NoSQL, notification → event/message và reporting → read path. Với mỗi dữ liệu ghi source of truth, consistency, backup, recovery và access control.
Bài tập
Đặt 6 failure scenarios: cache stale, DB primary lỗi, duplicate event, object xóa nhầm, replica lag và downstream timeout. Nếu design không mô tả behavior, bài review chưa đạt.
Bài giảng chuyên sâu
Data architecture review bằng source of truth
Commerce app có upload, catalog, order, notification và reporting. Review phải nối data flow: S3 giữ object, database giữ order authoritative, cache chỉ là bản sao, event truyền thay đổi và reporting đọc từ path phù hợp. Nếu hai service cùng ghi một bảng mà không owner, design có coupling ẩn.
Với mỗi data set ghi consistency, durability, backup, encryption, access boundary, retention và recovery. Read replica không phải backup; cache không phải source of truth; event stream không tự đảm bảo exactly-once. Async boundary cần retry/idempotency/DLQ, sync call cần timeout/circuit behavior.
Bài tập: tạo data contract table và đưa vào sáu lỗi: cache stale, DB primary fail, duplicate event, object deleted, replica lag, downstream timeout. Bài đạt khi expected state và owner rõ.