%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f', 'background':'#282828','mainBkg':'#3c3836' }}}%% flowchart TB CAP(["CAP Theoremเลือกได้แค่ 2 ใน 3"]) C["Consistencyทุก Node เห็นข้อมูลเดียวกัน"] A["Availabilityทุก Request ได้รับการตอบ"] P["Partition Toleranceทนต่อเน็ตขาด"] CAP --> C CAP --> A CAP --> P CP["CP: HBase, MongoDBCephFS, GlusterFS"] AP["AP: Cassandra, DynamoDBCouchDB, S3"] CA["CA: Single-node DB(ไม่ทนต่อ Partition)"] C --- CP P --- CP A --- AP P --- AP C --- CA A --- CA style CAP fill:#d79921,stroke:#fabd2f,color:#1d2021 style C fill:#458588,stroke:#83a598,color:#fbf1c7 style A fill:#98971a,stroke:#b8bb26,color:#fbf1c7 style P fill:#cc241d,stroke:#fb4934,color:#fbf1c7
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f','background':'#282828' }}}%% flowchart TB subgraph Client["เครื่อง Client"] APP["Application(cat, vim, ls)"] VFS["VFS Layer"] FUSE["FUSE Kernel Module"] SSHFS["sshfs(User-space Daemon)"] SSH_C["SSH Client"] end subgraph Server["เครื่อง Server"] SSHD["sshd"] SFTP["SFTP Server"] FS["Local FS(ext4/xfs)"] end APP --> VFS --> FUSE --> SSHFS --> SSH_C SSH_C -->|"port 22encrypted"| SSHD SSHD --> SFTP --> FS style FUSE fill:#d79921,stroke:#fabd2f,color:#1d2021 style SSHFS fill:#cc241d,stroke:#fb4934,color:#fbf1c7 style SSHD fill:#98971a,stroke:#b8bb26,color:#fbf1c7
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f','background':'#282828' }}}%% flowchart TB subgraph Era1["ยุคแรก (1984-1995)"] V1["NFSv1 (1984)Sun internal"] V2["NFSv2 (1989)RFC 1094UDP, 32-bit"] end subgraph Era2["ยุคพัฒนา (1995-2010)"] V3["NFSv3 (1995)RFC 1813TCP, 64-bit"] V4["NFSv4 (2003)RFC 3530Stateful"] end subgraph Era3["ยุคปัจจุบัน (2010-)"] V41["NFSv4.1 (2010)RFC 5661pNFS, Sessions"] V42["NFSv4.2 (2016)RFC 7862Server-side Copy"] end V1 --> V2 --> V3 --> V4 --> V41 --> V42 style V3 fill:#d65d0e,stroke:#fe8019,color:#fbf1c7 style V4 fill:#d79921,stroke:#fabd2f,color:#1d2021 style V41 fill:#98971a,stroke:#b8bb26,color:#fbf1c7 style V42 fill:#458588,stroke:#83a598,color:#fbf1c7
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f','background':'#282828' }}}%% flowchart LR subgraph Client["NFS Client"] APP_C["Application"] RPC_C["RPC Layer"] end subgraph Server["NFS Server"] RPCB["rpcbind(port 111)"] MOUNTD["rpc.mountd(port 20048)"] NFSD["nfsd(port 2049)"] LOCKD["rpc.statd+ lockd (NLM)"] IDMAPD["rpc.idmapdNFSv4 only"] FS["Local FS"] end APP_C --> RPC_C RPC_C -->|"1. Lookup"| RPCB RPC_C -->|"2. mount"| MOUNTD RPC_C -->|"3. r/w"| NFSD RPC_C -->|"4. lock"| LOCKD RPC_C -.->|"NFSv4"| IDMAPD NFSD --> FS style RPCB fill:#cc241d,stroke:#fb4934,color:#fbf1c7 style NFSD fill:#d79921,stroke:#fabd2f,color:#1d2021
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f','background':'#282828' }}}%% flowchart TB subgraph TSP["Trusted Storage Pool"] subgraph N1["Node 1"] B1["Brick 1"] B2["Brick 2"] end subgraph N2["Node 2"] B3["Brick 3"] B4["Brick 4"] end subgraph N3["Node 3"] B5["Brick 5"] B6["Brick 6"] end end V1["Volume(Distributed-Replicated)"] B1 --> V1 B3 --> V1 B5 --> V1 Client["GlusterFS Client (FUSE)"] V1 --> Client style V1 fill:#d79921,stroke:#fabd2f,color:#1d2021 style Client fill:#689d6a,stroke:#8ec07c,color:#fbf1c7
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3c3836','primaryTextColor':'#ebdbb2', 'primaryBorderColor':'#d79921','lineColor':'#fabd2f','background':'#282828' }}}%% flowchart TD Start(["ต้องการ Shared Storage"]) Q1{"POSIX FS?"} Q2{"ทุกเครื่อง Linux?"} Q3{"ขนาดข้อมูล?"} Q4{"HA สำคัญ?"} Q6{"S3 compatible?"} Start --> Q1 Q1 -->|"ไม่"| Q6 Q1 -->|"ใช่"| Q2 Q2 -->|"ใช่"| Q3 Q2 -->|"ไม่"| SAMBA["Samba SMB3"] Q3 -->|"<10TB"| NFS["NFSv4 + ZFS"] Q3 -->|"10TB-1PB"| Q4 Q3 -->|">1PB / HPC"| LUSTRE["Lustre / BeeGFS"] Q4 -->|"ใช่"| GLUSTER["GlusterFS / CephFS"] Q4 -->|"ไม่"| NFS Q6 -->|"ใช่"| MINIO["MinIO / Ceph RGW"] Q6 -->|"ไม่"| JUICE["JuiceFS"] style Start fill:#d79921,stroke:#fabd2f,color:#1d2021 style NFS fill:#458588,stroke:#83a598,color:#fbf1c7 style GLUSTER fill:#cc241d,stroke:#fb4934,color:#fbf1c7 style SAMBA fill:#98971a,stroke:#b8bb26,color:#fbf1c7