c24165b8bc
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5.7 KiB
5.7 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-카산드라-cassandra | 카산드라(Cassandra) | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
카산드라 (Cassandra)
매 한 줄
"매 write-optimized · 매 masterless · 매 AP 의 매 wide-column store". 매 Apache Cassandra 5.0 (2026) 은 매 Dynamo-style replication + 매 BigTable-style data model 의 매 합 — 매 single-region 1M+ writes/sec 의 매 linear scale, 매 multi-DC active-active, 매 tunable consistency. 매 partition key 설계 가 매 흥망 — 매 잘못된 model 은 매 hotspot · 매 large partition 의 매 재앙.
매 핵심
매 architecture
- 매 Masterless: 매 모든 node 가 매 동등 — 매 single point of failure 부재.
- 매 Consistent hashing: 매 token ring + 매 vnode (default 16) — 매 even distribution.
- 매 Replication: 매 RF=3 의 매 typical, 매 NetworkTopologyStrategy 로 매 multi-DC.
- 매 Gossip: 매 peer-to-peer cluster state.
- 매 LSM tree storage: 매 memtable → SSTable, 매 compaction (STCS / LCS / TWCS).
매 consistency
- 매 Tunable: ANY, ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL.
- 매 Strong: R+W > N (e.g., RF=3, R=QUORUM, W=QUORUM).
- 매 Eventual: ONE/ANY — 매 fast 하지만 매 stale read 가능.
- 매 LWT (Paxos): 매 conditional write — 매 비싸지만 매 linearizable.
매 응용
- 매 time-series (IoT, metrics, logs).
- 매 messaging / 매 feed (Discord 의 매 trillion+ msgs).
- 매 session / 매 cart store.
- 매 GenAI 의 매 vector + Cassandra 5 의 매 SAI vector index.
💻 패턴
Pattern 1: 매 Schema Design (query-first)
-- 매 BAD: 매 hotspot — 매 single partition
CREATE TABLE messages (
channel_id uuid PRIMARY KEY,
msg_id timeuuid,
body text
);
-- 매 GOOD: 매 bucketed time partition
CREATE TABLE messages (
channel_id uuid,
bucket text, -- 매 'YYYY-MM-DD'
msg_id timeuuid,
body text,
PRIMARY KEY ((channel_id, bucket), msg_id)
) WITH CLUSTERING ORDER BY (msg_id DESC);
Pattern 2: 매 Vector Search (Cassandra 5 SAI)
CREATE TABLE products (
id uuid PRIMARY KEY,
name text,
embedding vector<float, 1536>
);
CREATE CUSTOM INDEX ON products(embedding)
USING 'StorageAttachedIndex'
WITH OPTIONS = { 'similarity_function' : 'cosine' };
-- 매 ANN search
SELECT id, name FROM products
ORDER BY embedding ANN OF [0.1, 0.2, ...]
LIMIT 10;
Pattern 3: 매 Driver Async (Java)
CqlSession session = CqlSession.builder().build();
PreparedStatement ps = session.prepare(
"INSERT INTO messages (channel_id, bucket, msg_id, body) VALUES (?, ?, ?, ?)"
);
CompletionStage<AsyncResultSet> f = session.executeAsync(
ps.bind(channelId, bucket, msgId, body)
.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM)
);
Pattern 4: 매 Compaction Strategy 선택
-- 매 time-series → TWCS
ALTER TABLE metrics WITH compaction = {
'class': 'TimeWindowCompactionStrategy',
'compaction_window_size': '1',
'compaction_window_unit': 'DAYS'
};
-- 매 read-heavy → LCS
ALTER TABLE users WITH compaction = {
'class': 'LeveledCompactionStrategy',
'sstable_size_in_mb': '160'
};
-- 매 write-heavy general → STCS (default)
Pattern 5: 매 Multi-DC Replication
CREATE KEYSPACE app
WITH replication = {
'class': 'NetworkTopologyStrategy',
'us-east': 3,
'eu-west': 3,
'ap-northeast': 2
} AND durable_writes = true;
Pattern 6: 매 LWT (conditional)
-- 매 unique constraint
INSERT INTO users (email, id) VALUES ('a@b.com', uuid())
IF NOT EXISTS;
-- 매 비쌈 — 매 4 round trip Paxos. 매 hot path 회피.
Pattern 7: 매 Anti-pattern 진단
-- 매 nodetool tablestats 로 매 large partition 확인
-- nodetool tablestats keyspace.table | grep "Compacted partition maximum"
-- 매 100MB+ partition = 매 redesign signal
매 결정 기준
| 상황 | Approach |
|---|---|
| 매 write 1M+/sec | Cassandra (자연 fit) |
| 매 strong consistency 필수 | LWT or 매 다른 DB (CockroachDB, Spanner) |
| 매 ad-hoc query / JOIN | Postgres / Trino — 매 Cassandra 부적합 |
| 매 time-series | Cassandra + TWCS or ScyllaDB |
| 매 vector + scale | Cassandra 5 SAI or Milvus/Qdrant |
| 매 small data (< 1TB) | Postgres — 매 Cassandra overkill |
기본값: 매 query-first schema, 매 LOCAL_QUORUM, 매 RF=3, 매 partition < 100MB.
🔗 Graph
- 부모: NoSQL
- Adjacent: CAP Theorem & PACELC
🤖 LLM 활용
언제: 매 large-scale write workload 의 매 design, 매 multi-DC active-active 요건, 매 time-series storage, 매 schema review. 언제 X: 매 transactional / OLTP / JOIN 매 heavy — 매 RDBMS 가 매 적합. 매 small data — 매 over-engineering.
❌ 안티패턴
- 매 Large partition (>100MB): 매 OOM, 매 compaction failure, 매 read latency 폭발.
- 매 Hotspot key: 매 single-channel 모든 msg → 매 partition 폭발.
- 매 ALLOW FILTERING: 매 full scan — 매 production X.
- 매 Secondary index 의 매 high cardinality: 매 매번 매 fanout — 매 SAI 사용.
- 매 LWT 의 매 hot path: 매 4× latency.
- 매 SQL mindset (JOIN, GROUP BY): 매 denormalize 의 매 의무.
🧪 검증 / 중복
- Verified (Apache Cassandra 5.0 docs, DataStax docs, Discord engineering blog 2026).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Cassandra 5.0 (SAI vector) full 정리 |