| Chia service theo tầng (ui-svc, api-svc, db-svc)Splitting by layer (ui-svc, api-svc, db-svc) | Mọi thay đổi nghiệp vụ đụng cả ba → deploy đồng loạtEvery business change touches all three → coordinated deploy | Cắt lại theo năng lực nghiệp vụ (01)Re-cut along business capability (01) |
| “Chỉ đọc thôi” vào DB của service khác“Read-only access” into another service’s DB | Bên đọc phụ thuộc tên cột; schema của bạn đóng băngThe reader depends on your column names; your schema freezes | API hoặc read model dựng từ event (02)An API or an event-fed read model (02) |
| Retry mà không có idempotencyRetries without idempotency | Trừ tiền hai lần, tạo đơn trùngDouble charges, duplicate orders | Idempotency key + unique index (06)Idempotency key + unique index (06) |
| Dùng timeout mặc định của thư việnUsing the library’s default timeout | Mặc định của nhiều client là vô hạnMany client defaults are infinite | Đặt từ p99, truyền deadline tuyệt đối (07)Set from p99, propagate an absolute deadline (07) |
| Timeout tầng trong lớn hơn tầng ngoàiInner timeout larger than the outer one | Bên ngoài bỏ cuộc, bên trong vẫn giữ tài nguyênThe caller gave up; the inner call still holds resources | Ngân sách nhỏ dần theo chuỗi (07)Budget shrinks down the chain (07) |
| Circuit breaker không có fallbackA circuit breaker with no fallback | Chỉ đổi lỗi chậm thành lỗi nhanhIt only converts a slow failure into a fast one | Thiết kế fallback trước khi bật (08)Design the fallback before enabling it (08) |
| Ngắt breaker theo số đếm thay vì tỷ lệTripping the breaker on a count, not a rate | Lúc lưu lượng thấp sẽ mở oanIt opens for no reason during low traffic | Tỷ lệ lỗi + số mẫu tối thiểu (08)Error rate + a minimum sample size (08) |
| 2PC / distributed transaction giữa các service2PC / distributed transactions across services | Khoá phân tán, không sống nổi khi mạng chập chờnDistributed locks; does not survive a flaky network | Saga + bù trừ nghiệp vụ (09)A saga with business compensation (09) |
| Bước không hoàn tác được nằm giữa sagaAn irreversible step in the middle of a saga | Không có cách nào quay lạiThere is no way back | Sắp nó xuống cuối cùng (09)Move it to the end (09) |
| Log tập trung nhưng không có trace idCentralized logs with no trace id | Có log của mọi service, không có chuỗi nhân quảLogs from every service, no causal chain | OpenTelemetry + traceparent (10)OpenTelemetry + traceparent (10) |
| Quên truyền trace context qua message asyncForgetting trace context on async messages | Chuỗi trace gãy đúng chỗ khó debug nhấtThe trace breaks exactly where debugging is hardest | Inject context vào header của message (10)Inject the context into message headers (10) |
| Logic nghiệp vụ nằm trong gatewayBusiness logic inside the gateway | Mọi thay đổi nghiệp vụ phải deploy gatewayEvery business change requires a gateway deploy | Gateway chỉ định tuyến + chính sách (05)The gateway does routing and policy only (05) |
| Ghi xong đọc lại ngay từ replicaReading from a replica right after writing | Trả về dữ liệu cũ, trông như ghi thất bạiReturns stale data; it looks like the write failed | Sticky primary hoặc render từ response (11)Sticky primary, or render from the response (11) |
| Chia microservices khi team có 4 ngườiAdopting microservices with a team of four | Chi phí phối hợp lớn hơn lợi ích tự chủCoordination cost exceeds the autonomy benefit | Modular monolith (12)Modular monolith (12) |
| Chia thêm service để chữa hệ thống đang rốiSplitting more services to fix a messy system | Thêm ranh giới mạng lên một mô hình đã saiAdds network boundaries on top of a wrong model | Sửa ranh giới trước, hoặc gộp lại (12)Fix the boundaries first, or merge back (12) |