Architecture
Overview
Node-RED 4.0.3 is a flow-based programming tool for wiring together hardware devices, APIs, and online services. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette.
Core Components
Runtime Engine
-
Node.js Runtime: Built on Node.js, providing asynchronous, event-driven architecture
-
Flow Engine: Executes flows created in the editor
-
Message Passing: JSON-based message passing between nodes
-
Context Storage: Provides persistent storage for flow, node, and global contexts
Editor Interface
-
Web-based Editor: Browser-based flow editor accessible via HTTP/HTTPS
-
Node Palette: Drag-and-drop interface for available nodes
-
Workspace: Visual canvas for creating flows
-
Configuration Panel: Node property configuration interface
Node Types
-
Input Nodes: Receive data from external sources
-
Processing Nodes: Transform and manipulate data
-
Output Nodes: Send data to external destinations
-
Function Nodes: Custom JavaScript code execution
System Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Web Browser │ │ Load Balancer │ │ Node-RED │ │ (Editor UI) │◄──►│ (Optional) │◄──►│ Runtime │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ ▼ ┌─────────────────┐ │ File System │ │ (Flows/Data) │ └─────────────────┘
Deployment Patterns
Standalone Deployment
-
Single Node-RED instance
-
Suitable for development and small-scale deployments
-
Direct file system storage
Clustered Deployment
-
Multiple Node-RED instances behind load balancer
-
Shared storage for flows and context
-
High availability and scalability
Container Deployment
-
Docker containers for consistent deployment
-
Kubernetes orchestration support
-
Microservices architecture integration