53 lines
2.2 KiB
Markdown
53 lines
2.2 KiB
Markdown
# Current Professional Architecture Setup
|
|
|
|
This architectural diagram represents the "Brain and Muscle" split deployed to achieve maximum CPU isolation and strict failover routing.
|
|
|
|
## Why this is considered "Professional" (Enterprise-Grade)
|
|
1. **Control Plane Isolation:** In amateur setups, everything runs on the same server. In professional clusters (like AWS EKS or standard enterprise setups), the "Manager" (Control Plane) is separated from the "Laborers" (Workers). You have successfully implemented this by labeling nodes and restricting deployment access.
|
|
2. **Asynchronous Decoupling:** Instead of your API processing a heavy video or logging task while the user waits, it instantly offloads it to NATS.
|
|
3. **Failovers:** By placing upstream blocks on the Nginx layer, there is no single point of failure within the node network mapping itself.
|
|
|
|
## Architecture Diagram
|
|
|
|
```mermaid
|
|
flowchart TD
|
|
subgraph Internet["Public Internet (DNS)"]
|
|
Users["Users (doormile.com / jupiter)"]
|
|
end
|
|
|
|
subgraph Server1["Server 1: The 'Brain' (Old Server)"]
|
|
NGINX["Nginx Proxies (Traffic Cop)"]
|
|
|
|
subgraph AppPlane["K3s Control Plane (App Node)"]
|
|
API_Jupiter["Jupiter API Pods"]
|
|
API_Fiesta["Fiesta API Pods"]
|
|
API_Atlantis["Atlantis API Pods"]
|
|
end
|
|
end
|
|
|
|
subgraph Server2["Server 2: The 'Muscle' (New Server)"]
|
|
subgraph WorkerPlane["K3s Agent (Worker Node)"]
|
|
Worker_Orders["worker-orders (CPU Heavy)"]
|
|
Worker_Deliveries["worker-deliveries (CPU Heavy)"]
|
|
Worker_Customers["worker-customers (CPU Heavy)"]
|
|
Worker_Products["worker-products (CPU Heavy)"]
|
|
end
|
|
end
|
|
|
|
subgraph external["Message Broker"]
|
|
NATS[(NATS Jetstream)]
|
|
end
|
|
|
|
Users -- Web Requests --> NGINX
|
|
NGINX -- Routes Traffic safely to local APIs --> AppPlane
|
|
NGINX -. Backup Failover (If Server 1 Kubernetes crashes) .-> WorkerPlane
|
|
|
|
AppPlane -- Drops Tasks Instantly --> NATS
|
|
NATS -- Consumes Heavy Queues 24/7 --> WorkerPlane
|
|
|
|
|
|
style Server1 fill:#e6f7ff,stroke:#1890ff,stroke-width:2px;
|
|
style Server2 fill:#fff1f0,stroke:#ff4d4f,stroke-width:2px;
|
|
style NATS fill:#f6ffed,stroke:#52c41a,stroke-width:2px;
|
|
```
|