first commit
This commit is contained in:
commit
086d898b68
154 files changed
+68619
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,168 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 800" font-family="Arial, sans-serif">
|
||||
<defs>
|
||||
<linearGradient id="lbGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="apiGradD" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#11998e;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#38ef7d;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="redisGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#dc2626;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#ef4444;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="pgGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#336791;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#4a90c2;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="s3Grad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#ff9900;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#ffb84d;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="workerGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#8b5cf6;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#a78bfa;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="uploadGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#ec4899;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#f472b6;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter id="shadowD" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="2" dy="2" stdDeviation="3" flood-opacity="0.3"/>
|
||||
</filter>
|
||||
<marker id="arrowD" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
||||
<polygon points="0 0, 10 3.5, 0 7" fill="#666"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<!-- Title -->
|
||||
<text x="450" y="30" text-anchor="middle" font-size="20" font-weight="bold" fill="#333">
|
||||
CaStAD Distributed Architecture (Scale-Out)
|
||||
</text>
|
||||
|
||||
<!-- Load Balancer -->
|
||||
<rect x="325" y="50" width="250" height="60" rx="10" fill="url(#lbGrad)" filter="url(#shadowD)"/>
|
||||
<text x="450" y="78" text-anchor="middle" font-size="14" font-weight="bold" fill="white">Load Balancer</text>
|
||||
<text x="450" y="98" text-anchor="middle" font-size="11" fill="white">nginx / AWS ALB</text>
|
||||
|
||||
<!-- Arrows to API Servers -->
|
||||
<path d="M 350 110 L 175 145" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
<path d="M 450 110 L 450 145" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
<path d="M 550 110 L 725 145" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
|
||||
<!-- API Servers -->
|
||||
<rect x="75" y="145" width="200" height="70" rx="10" fill="url(#apiGradD)" filter="url(#shadowD)"/>
|
||||
<text x="175" y="175" text-anchor="middle" font-size="13" font-weight="bold" fill="white">API Server 1</text>
|
||||
<text x="175" y="195" text-anchor="middle" font-size="11" fill="white">Express.js</text>
|
||||
|
||||
<rect x="350" y="145" width="200" height="70" rx="10" fill="url(#apiGradD)" filter="url(#shadowD)"/>
|
||||
<text x="450" y="175" text-anchor="middle" font-size="13" font-weight="bold" fill="white">API Server 2</text>
|
||||
<text x="450" y="195" text-anchor="middle" font-size="11" fill="white">Express.js</text>
|
||||
|
||||
<rect x="625" y="145" width="200" height="70" rx="10" fill="url(#apiGradD)" filter="url(#shadowD)"/>
|
||||
<text x="725" y="175" text-anchor="middle" font-size="13" font-weight="bold" fill="white">API Server N</text>
|
||||
<text x="725" y="195" text-anchor="middle" font-size="11" fill="white">Express.js</text>
|
||||
|
||||
<!-- Vertical line connecting API servers -->
|
||||
<path d="M 175 215 L 175 250 L 725 250 L 725 215" stroke="#666" stroke-width="1.5" fill="none"/>
|
||||
<path d="M 450 215 L 450 250" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 450 250 L 450 285" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
|
||||
<!-- Data Layer -->
|
||||
<!-- Redis -->
|
||||
<rect x="50" y="300" width="220" height="120" rx="10" fill="url(#redisGrad)" filter="url(#shadowD)"/>
|
||||
<text x="160" y="330" text-anchor="middle" font-size="14" font-weight="bold" fill="white">Redis</text>
|
||||
<text x="160" y="350" text-anchor="middle" font-size="11" fill="white">(Cache / Queue)</text>
|
||||
<text x="160" y="375" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Session Store</text>
|
||||
<text x="160" y="390" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Job Queue (Bull)</text>
|
||||
<text x="160" y="405" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Rate Limiting</text>
|
||||
|
||||
<!-- PostgreSQL -->
|
||||
<rect x="340" y="300" width="220" height="120" rx="10" fill="url(#pgGrad)" filter="url(#shadowD)"/>
|
||||
<text x="450" y="330" text-anchor="middle" font-size="14" font-weight="bold" fill="white">PostgreSQL</text>
|
||||
<text x="450" y="350" text-anchor="middle" font-size="11" fill="white">(Primary)</text>
|
||||
<rect x="370" y="365" width="160" height="40" rx="5" fill="rgba(255,255,255,0.2)"/>
|
||||
<text x="450" y="385" text-anchor="middle" font-size="10" fill="white">Replica (Read)</text>
|
||||
<text x="450" y="400" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.8)">High Availability</text>
|
||||
|
||||
<!-- S3/MinIO -->
|
||||
<rect x="630" y="300" width="220" height="120" rx="10" fill="url(#s3Grad)" filter="url(#shadowD)"/>
|
||||
<text x="740" y="330" text-anchor="middle" font-size="14" font-weight="bold" fill="white">S3 / MinIO</text>
|
||||
<text x="740" y="350" text-anchor="middle" font-size="11" fill="white">(Storage)</text>
|
||||
<text x="740" y="375" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Videos</text>
|
||||
<text x="740" y="390" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Images</text>
|
||||
<text x="740" y="405" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">• Assets</text>
|
||||
|
||||
<!-- Connecting lines from data layer -->
|
||||
<path d="M 160 420 L 160 450 L 450 450 L 450 480" stroke="#666" stroke-width="1.5" fill="none"/>
|
||||
<path d="M 450 420 L 450 480" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 740 420 L 740 450 L 450 450" stroke="#666" stroke-width="1.5" fill="none"/>
|
||||
<path d="M 450 480 L 450 495" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
|
||||
<!-- Render Workers -->
|
||||
<rect x="75" y="510" width="180" height="70" rx="10" fill="url(#workerGrad)" filter="url(#shadowD)"/>
|
||||
<text x="165" y="540" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Render Worker 1</text>
|
||||
<text x="165" y="560" text-anchor="middle" font-size="10" fill="white">Puppeteer + FFmpeg</text>
|
||||
|
||||
<rect x="310" y="510" width="180" height="70" rx="10" fill="url(#workerGrad)" filter="url(#shadowD)"/>
|
||||
<text x="400" y="540" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Render Worker 2</text>
|
||||
<text x="400" y="560" text-anchor="middle" font-size="10" fill="white">Puppeteer + FFmpeg</text>
|
||||
|
||||
<rect x="545" y="510" width="180" height="70" rx="10" fill="url(#workerGrad)" filter="url(#shadowD)"/>
|
||||
<text x="635" y="540" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Render Worker N</text>
|
||||
<text x="635" y="560" text-anchor="middle" font-size="10" fill="white">Puppeteer + FFmpeg</text>
|
||||
|
||||
<!-- Arrows to Render Workers -->
|
||||
<path d="M 350 495 L 165 510" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 450 495 L 400 510" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 550 495 L 635 510" stroke="#666" stroke-width="1.5"/>
|
||||
|
||||
<!-- Connecting line to Upload Workers -->
|
||||
<path d="M 165 580 L 165 610 L 635 610 L 635 580" stroke="#666" stroke-width="1.5" fill="none"/>
|
||||
<path d="M 400 580 L 400 610" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 400 610 L 400 640" stroke="#666" stroke-width="2" marker-end="url(#arrowD)"/>
|
||||
|
||||
<!-- Upload Workers -->
|
||||
<rect x="75" y="655" width="180" height="70" rx="10" fill="url(#uploadGrad)" filter="url(#shadowD)"/>
|
||||
<text x="165" y="685" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Upload Worker 1</text>
|
||||
<text x="165" y="705" text-anchor="middle" font-size="10" fill="white">YouTube</text>
|
||||
|
||||
<rect x="310" y="655" width="180" height="70" rx="10" fill="url(#uploadGrad)" filter="url(#shadowD)"/>
|
||||
<text x="400" y="685" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Upload Worker 2</text>
|
||||
<text x="400" y="705" text-anchor="middle" font-size="10" fill="white">Instagram</text>
|
||||
|
||||
<rect x="545" y="655" width="180" height="70" rx="10" fill="url(#uploadGrad)" filter="url(#shadowD)"/>
|
||||
<text x="635" y="685" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Upload Worker N</text>
|
||||
<text x="635" y="705" text-anchor="middle" font-size="10" fill="white">TikTok</text>
|
||||
|
||||
<!-- Arrows to Upload Workers -->
|
||||
<path d="M 300 640 L 165 655" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 400 640 L 400 655" stroke="#666" stroke-width="1.5"/>
|
||||
<path d="M 500 640 L 635 655" stroke="#666" stroke-width="1.5"/>
|
||||
|
||||
<!-- External APIs label -->
|
||||
<rect x="750" y="655" width="130" height="70" rx="8" fill="#f0f0f0" stroke="#ccc" stroke-width="1"/>
|
||||
<text x="815" y="680" text-anchor="middle" font-size="11" font-weight="bold" fill="#666">External APIs</text>
|
||||
<text x="815" y="698" text-anchor="middle" font-size="9" fill="#888">Gemini • Suno</text>
|
||||
<text x="815" y="712" text-anchor="middle" font-size="9" fill="#888">YouTube • IG • TikTok</text>
|
||||
|
||||
<!-- Capacity Labels -->
|
||||
<rect x="780" y="50" width="100" height="25" rx="5" fill="#22c55e"/>
|
||||
<text x="830" y="68" text-anchor="middle" font-size="11" fill="white">50,000+ users</text>
|
||||
|
||||
<!-- Legend -->
|
||||
<rect x="20" y="750" width="860" height="40" rx="5" fill="#f8f9fa" stroke="#e9ecef"/>
|
||||
<circle cx="60" cy="770" r="8" fill="url(#apiGradD)"/>
|
||||
<text x="75" y="774" font-size="10" fill="#666">API Server</text>
|
||||
<circle cx="180" cy="770" r="8" fill="url(#redisGrad)"/>
|
||||
<text x="195" y="774" font-size="10" fill="#666">Redis</text>
|
||||
<circle cx="280" cy="770" r="8" fill="url(#pgGrad)"/>
|
||||
<text x="295" y="774" font-size="10" fill="#666">PostgreSQL</text>
|
||||
<circle cx="400" cy="770" r="8" fill="url(#s3Grad)"/>
|
||||
<text x="415" y="774" font-size="10" fill="#666">S3/MinIO</text>
|
||||
<circle cx="510" cy="770" r="8" fill="url(#workerGrad)"/>
|
||||
<text x="525" y="774" font-size="10" fill="#666">Render Worker</text>
|
||||
<circle cx="650" cy="770" r="8" fill="url(#uploadGrad)"/>
|
||||
<text x="665" y="774" font-size="10" fill="#666">Upload Worker</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,183 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 700" font-family="Arial, sans-serif">
|
||||
<defs>
|
||||
<linearGradient id="k8sGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#326ce5;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#1d4ed8;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="ingressGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#6366f1;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#4f46e5;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="deployGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#10b981;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#059669;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="podGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#34d399;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#10b981;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="statefulGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#f59e0b;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#d97706;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="externalGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#94a3b8;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#64748b;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter id="shadowK" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="2" dy="2" stdDeviation="3" flood-opacity="0.3"/>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<!-- Title -->
|
||||
<text x="450" y="28" text-anchor="middle" font-size="20" font-weight="bold" fill="#333">
|
||||
CaStAD Kubernetes Architecture
|
||||
</text>
|
||||
|
||||
<!-- Main K8s Cluster Box -->
|
||||
<rect x="30" y="45" width="840" height="590" rx="15" fill="url(#k8sGrad)" filter="url(#shadowK)" opacity="0.1"/>
|
||||
<rect x="30" y="45" width="840" height="590" rx="15" fill="none" stroke="url(#k8sGrad)" stroke-width="3"/>
|
||||
|
||||
<!-- K8s Logo and Label -->
|
||||
<text x="450" y="75" text-anchor="middle" font-size="16" font-weight="bold" fill="#326ce5">Kubernetes Cluster</text>
|
||||
|
||||
<!-- Ingress Controller -->
|
||||
<rect x="250" y="95" width="400" height="55" rx="10" fill="url(#ingressGrad)" filter="url(#shadowK)"/>
|
||||
<text x="450" y="120" text-anchor="middle" font-size="13" font-weight="bold" fill="white">Ingress Controller</text>
|
||||
<text x="450" y="138" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">nginx-ingress / Traefik</text>
|
||||
|
||||
<!-- Arrow from Ingress -->
|
||||
<path d="M 450 150 L 450 175" stroke="#666" stroke-width="2"/>
|
||||
|
||||
<!-- Deployments Section -->
|
||||
<rect x="50" y="175" width="800" height="280" rx="10" fill="rgba(16,185,129,0.1)" stroke="#10b981" stroke-width="1" stroke-dasharray="5,5"/>
|
||||
<text x="450" y="195" text-anchor="middle" font-size="12" font-weight="bold" fill="#059669">Deployments (Auto-Scaling with HPA)</text>
|
||||
|
||||
<!-- API Deployment -->
|
||||
<rect x="70" y="210" width="250" height="110" rx="8" fill="url(#deployGrad)" filter="url(#shadowK)"/>
|
||||
<text x="195" y="232" text-anchor="middle" font-size="12" font-weight="bold" fill="white">API Deployment</text>
|
||||
<text x="195" y="248" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">HPA: 2-10 pods</text>
|
||||
|
||||
<!-- API Pods -->
|
||||
<g transform="translate(85, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(130, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(175, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(220, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="#d1d5db"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="#666">...</text>
|
||||
</g>
|
||||
|
||||
<!-- Render Worker Deployment -->
|
||||
<rect x="340" y="210" width="250" height="110" rx="8" fill="url(#deployGrad)" filter="url(#shadowK)"/>
|
||||
<text x="465" y="232" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Render Worker</text>
|
||||
<text x="465" y="248" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">HPA: 3-20 pods (GPU nodes)</text>
|
||||
|
||||
<!-- Render Pods -->
|
||||
<g transform="translate(355, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(400, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(445, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(490, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="#d1d5db"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="#666">...</text>
|
||||
</g>
|
||||
|
||||
<!-- Upload Worker Deployment -->
|
||||
<rect x="610" y="210" width="220" height="110" rx="8" fill="url(#deployGrad)" filter="url(#shadowK)"/>
|
||||
<text x="720" y="232" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Upload Worker</text>
|
||||
<text x="720" y="248" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">HPA: 2-5 pods</text>
|
||||
|
||||
<!-- Upload Pods -->
|
||||
<g transform="translate(640, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(685, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="url(#podGrad)"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="white">Pod</text>
|
||||
</g>
|
||||
<g transform="translate(730, 260)">
|
||||
<rect x="0" y="0" width="40" height="45" rx="5" fill="#d1d5db"/>
|
||||
<text x="20" y="28" text-anchor="middle" font-size="9" fill="#666">...</text>
|
||||
</g>
|
||||
|
||||
<!-- Scheduler Deployment -->
|
||||
<rect x="70" y="335" width="250" height="70" rx="8" fill="url(#deployGrad)" filter="url(#shadowK)"/>
|
||||
<text x="195" y="362" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Scheduler (CronJob)</text>
|
||||
<text x="195" y="382" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">Weekly Auto-Generation</text>
|
||||
|
||||
<!-- Monitoring Deployment -->
|
||||
<rect x="340" y="335" width="250" height="70" rx="8" fill="url(#deployGrad)" filter="url(#shadowK)"/>
|
||||
<text x="465" y="362" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Monitoring Stack</text>
|
||||
<text x="465" y="382" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">Prometheus + Grafana</text>
|
||||
|
||||
<!-- StatefulSets Section -->
|
||||
<rect x="50" y="460" width="800" height="95" rx="10" fill="rgba(245,158,11,0.1)" stroke="#f59e0b" stroke-width="1" stroke-dasharray="5,5"/>
|
||||
<text x="450" y="480" text-anchor="middle" font-size="12" font-weight="bold" fill="#d97706">StatefulSets (Persistent Data)</text>
|
||||
|
||||
<!-- PostgreSQL StatefulSet -->
|
||||
<rect x="100" y="495" width="300" height="50" rx="8" fill="url(#statefulGrad)" filter="url(#shadowK)"/>
|
||||
<text x="250" y="520" text-anchor="middle" font-size="12" font-weight="bold" fill="white">PostgreSQL (Primary + Replicas)</text>
|
||||
<text x="250" y="538" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">PersistentVolumeClaim</text>
|
||||
|
||||
<!-- Redis StatefulSet -->
|
||||
<rect x="500" y="495" width="300" height="50" rx="8" fill="url(#statefulGrad)" filter="url(#shadowK)"/>
|
||||
<text x="650" y="520" text-anchor="middle" font-size="12" font-weight="bold" fill="white">Redis Cluster (3-node)</text>
|
||||
<text x="650" y="538" text-anchor="middle" font-size="10" fill="rgba(255,255,255,0.9)">PersistentVolumeClaim</text>
|
||||
|
||||
<!-- External Services Section -->
|
||||
<rect x="50" y="565" width="800" height="60" rx="10" fill="rgba(148,163,184,0.1)" stroke="#94a3b8" stroke-width="1" stroke-dasharray="5,5"/>
|
||||
<text x="450" y="585" text-anchor="middle" font-size="12" font-weight="bold" fill="#64748b">External Services</text>
|
||||
|
||||
<!-- External Service Icons -->
|
||||
<rect x="90" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="140" y="612" text-anchor="middle" font-size="10" fill="white">AWS S3</text>
|
||||
|
||||
<rect x="220" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="270" y="612" text-anchor="middle" font-size="10" fill="white">Gemini API</text>
|
||||
|
||||
<rect x="350" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="400" y="612" text-anchor="middle" font-size="10" fill="white">Suno API</text>
|
||||
|
||||
<rect x="480" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="530" y="612" text-anchor="middle" font-size="10" fill="white">YouTube API</text>
|
||||
|
||||
<rect x="610" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="660" y="612" text-anchor="middle" font-size="10" fill="white">Instagram</text>
|
||||
|
||||
<rect x="740" y="595" width="100" height="25" rx="5" fill="url(#externalGrad)"/>
|
||||
<text x="790" y="612" text-anchor="middle" font-size="10" fill="white">TikTok</text>
|
||||
|
||||
<!-- Legend -->
|
||||
<rect x="30" y="650" width="840" height="40" rx="5" fill="#f8f9fa" stroke="#e9ecef"/>
|
||||
<rect x="60" y="663" width="30" height="15" rx="3" fill="url(#ingressGrad)"/>
|
||||
<text x="100" y="675" font-size="10" fill="#666">Ingress</text>
|
||||
<rect x="170" y="663" width="30" height="15" rx="3" fill="url(#deployGrad)"/>
|
||||
<text x="210" y="675" font-size="10" fill="#666">Deployment</text>
|
||||
<rect x="300" y="663" width="30" height="15" rx="3" fill="url(#podGrad)"/>
|
||||
<text x="340" y="675" font-size="10" fill="#666">Pod</text>
|
||||
<rect x="400" y="663" width="30" height="15" rx="3" fill="url(#statefulGrad)"/>
|
||||
<text x="440" y="675" font-size="10" fill="#666">StatefulSet</text>
|
||||
<rect x="530" y="663" width="30" height="15" rx="3" fill="url(#externalGrad)"/>
|
||||
<text x="570" y="675" font-size="10" fill="#666">External</text>
|
||||
|
||||
<!-- HPA indicator -->
|
||||
<text x="700" y="675" font-size="10" fill="#666">HPA = Horizontal Pod Autoscaler</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,112 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 650" font-family="Arial, sans-serif">
|
||||
<defs>
|
||||
<linearGradient id="serverGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="frontendGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#11998e;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#38ef7d;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="backendGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#fc4a1a;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#f7b733;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="dbGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#4facfe;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#00f2fe;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="storageGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#a8edea;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#fed6e3;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient id="apiGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#ffecd2;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#fcb69f;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="2" dy="2" stdDeviation="3" flood-opacity="0.3"/>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<!-- Title -->
|
||||
<text x="400" y="30" text-anchor="middle" font-size="20" font-weight="bold" fill="#333">
|
||||
CaStAD Single Server Architecture
|
||||
</text>
|
||||
|
||||
<!-- Main Server Box -->
|
||||
<rect x="100" y="50" width="600" height="420" rx="15" fill="url(#serverGrad)" filter="url(#shadow)" opacity="0.15"/>
|
||||
<rect x="100" y="50" width="600" height="420" rx="15" fill="none" stroke="url(#serverGrad)" stroke-width="3"/>
|
||||
<text x="400" y="80" text-anchor="middle" font-size="16" font-weight="bold" fill="#667eea">Single Server</text>
|
||||
|
||||
<!-- Frontend Box -->
|
||||
<rect x="150" y="100" width="500" height="70" rx="10" fill="url(#frontendGrad)" filter="url(#shadow)"/>
|
||||
<text x="400" y="130" text-anchor="middle" font-size="14" font-weight="bold" fill="white">Frontend</text>
|
||||
<text x="400" y="150" text-anchor="middle" font-size="12" fill="white">React + Vite (Port 5173)</text>
|
||||
|
||||
<!-- Arrow from Frontend to Backend -->
|
||||
<path d="M 400 170 L 400 190" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
|
||||
<defs>
|
||||
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
||||
<polygon points="0 0, 10 3.5, 0 7" fill="#666"/>
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<!-- Backend Box -->
|
||||
<rect x="150" y="190" width="500" height="100" rx="10" fill="url(#backendGrad)" filter="url(#shadow)"/>
|
||||
<text x="400" y="215" text-anchor="middle" font-size="14" font-weight="bold" fill="white">Backend</text>
|
||||
<text x="400" y="235" text-anchor="middle" font-size="12" fill="white">Express.js (Port 3001)</text>
|
||||
|
||||
<!-- Service boxes inside Backend -->
|
||||
<rect x="175" y="250" width="120" height="30" rx="5" fill="white" opacity="0.9"/>
|
||||
<text x="235" y="270" text-anchor="middle" font-size="11" fill="#fc4a1a">Auth Service</text>
|
||||
|
||||
<rect x="315" y="250" width="120" height="30" rx="5" fill="white" opacity="0.9"/>
|
||||
<text x="375" y="270" text-anchor="middle" font-size="11" fill="#fc4a1a">Render Service</text>
|
||||
|
||||
<rect x="455" y="250" width="120" height="30" rx="5" fill="white" opacity="0.9"/>
|
||||
<text x="515" y="270" text-anchor="middle" font-size="11" fill="#fc4a1a">API Proxy</text>
|
||||
|
||||
<!-- Arrow from Backend to Database -->
|
||||
<path d="M 400 290 L 400 310" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
|
||||
|
||||
<!-- Database Box -->
|
||||
<rect x="150" y="310" width="500" height="60" rx="10" fill="url(#dbGrad)" filter="url(#shadow)"/>
|
||||
<text x="400" y="340" text-anchor="middle" font-size="14" font-weight="bold" fill="white">Database</text>
|
||||
<text x="400" y="358" text-anchor="middle" font-size="12" fill="white">SQLite (File-based)</text>
|
||||
|
||||
<!-- Arrow from Database to Storage -->
|
||||
<path d="M 400 370 L 400 390" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
|
||||
|
||||
<!-- File Storage Box -->
|
||||
<rect x="150" y="390" width="500" height="60" rx="10" fill="url(#storageGrad)" filter="url(#shadow)"/>
|
||||
<text x="400" y="418" text-anchor="middle" font-size="14" font-weight="bold" fill="#333">File Storage</text>
|
||||
<text x="400" y="438" text-anchor="middle" font-size="11" fill="#666">Local Filesystem (downloads/, temp/, uploads/)</text>
|
||||
|
||||
<!-- External APIs -->
|
||||
<path d="M 400 470 L 400 500" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
|
||||
|
||||
<!-- Gemini API -->
|
||||
<rect x="120" y="520" width="150" height="60" rx="10" fill="url(#apiGrad)" filter="url(#shadow)"/>
|
||||
<text x="195" y="545" text-anchor="middle" font-size="13" font-weight="bold" fill="#333">Gemini API</text>
|
||||
<text x="195" y="565" text-anchor="middle" font-size="10" fill="#666">AI Content</text>
|
||||
|
||||
<!-- Suno API -->
|
||||
<rect x="325" y="520" width="150" height="60" rx="10" fill="url(#apiGrad)" filter="url(#shadow)"/>
|
||||
<text x="400" y="545" text-anchor="middle" font-size="13" font-weight="bold" fill="#333">Suno API</text>
|
||||
<text x="400" y="565" text-anchor="middle" font-size="10" fill="#666">AI Music</text>
|
||||
|
||||
<!-- YouTube API -->
|
||||
<rect x="530" y="520" width="150" height="60" rx="10" fill="url(#apiGrad)" filter="url(#shadow)"/>
|
||||
<text x="605" y="545" text-anchor="middle" font-size="13" font-weight="bold" fill="#333">YouTube API</text>
|
||||
<text x="605" y="565" text-anchor="middle" font-size="10" fill="#666">Video Upload</text>
|
||||
|
||||
<!-- Connecting lines to APIs -->
|
||||
<path d="M 300 500 L 195 520" stroke="#666" stroke-width="1.5" stroke-dasharray="5,5"/>
|
||||
<path d="M 400 500 L 400 520" stroke="#666" stroke-width="1.5" stroke-dasharray="5,5"/>
|
||||
<path d="M 500 500 L 605 520" stroke="#666" stroke-width="1.5" stroke-dasharray="5,5"/>
|
||||
|
||||
<!-- Capacity Label -->
|
||||
<rect x="620" y="60" width="70" height="25" rx="5" fill="#e74c3c"/>
|
||||
<text x="655" y="78" text-anchor="middle" font-size="11" fill="white">~50 users</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
Reference in new issue
Block a user