Trung BìnhAWS & Cloud iconAWS & Cloud

Amazon Redshift là gì? Khi nào dùng Redshift thay vì RDS? Giải thích columnar storage và distribution styles.

Amazon Redshift là petabyte-scale data warehouse dựa trên columnar storage, tối ưu cho OLAP (Online Analytical Processing) — complex queries trên large datasets, reporting, BI. Khác biệt với OLTP (RDS): Redshift lưu data theo cột thay vì hàng, giúp compression tốt hơn và scan nhanh hơn khi chỉ cần một số cột trong query analytic.

Redshift cluster gồm: 1 leader node (parse/plan query, coordinate) + nhiều compute nodes (lưu data, thực thi query); Redshift Serverless tự động scale.

Distribution styles quyết định data phân phối thế nào:
- EVEN — phân phối đều qua tất cả nodes, tốt khi không có JOIN
- KEY — phân phối theo giá trị của column, tốt khi JOIN thường xuyên trên column đó (co-locate related data)
- ALL — copy toàn bộ table vào mọi node, chỉ dùng cho dimension tables nhỏ
- AUTO — Redshift tự chọn

Sort keys giúp range scan hiệu quả (như index trong traditional DB). Redshift Spectrum cho phép query data trực tiếp trên S3 (data lake) mà không cần load vào Redshift — pay per query. Materialized views cho pre-computed aggregation. Redshift phù hợp: business reporting, historical data analysis, data lake queries; không phù hợp: OLTP, nhiều small updates, NoSQL flexible schema.

Xem toàn bộ AWS & Cloud cùng filter theo level & chủ đề con.

Mở danh sách AWS & Cloud