LeadHub Plan

Kiến trúc & hạ tầng

Kiến trúc tổng thể, monorepo, khả năng chịu tải, chiến lược cache, tên miền.

Khả năng chịu tải & chống spam

API stateless, scale ngang; Postgres + read replica; Redis cho cache/rate limit. Webhook trả 200 ngay, xử lý qua queue, idempotent theo message id. Rate limit theo IP + user + workspace; client có debounce, backoff mũ, dedupe request đang bay. Realtime chỉ gửi "có thay đổi gì", c

Chiến lược cache 1 năm & làm mới khi thay đổi

Loại Cache Control Làm mới JS/CSS đã build max age=31536000, immutable tên file chứa hash nội dung Ảnh/video/giọng nói 1 năm, immutable URL chứa hash/version Drive: fileId@version HTML no cache luôn kiểm tra lại → trỏ tới asset mới API no store — Mỗi lần deploy: Terraform gọi Clo