Node-RED is what happens when you give an engineer a canvas instead of a code editor: wire a message source to a transform to a database to a chart, deploy, and watch it run. It is the fastest path from machines that publish data to people who can see it. This post follows a plant engineer building a factory dashboard with Node-RED on MassiveGRID PaaS, which is built on Virtuozzo Application Platform, formerly Jelastic, and then doing the unglamorous work of making it production-grade.

The plant belongs to a precision-machining company we will call Kestrel Precision: twelve CNC machines with gateways that publish state and spindle data over MQTT to a Mosquitto broker already on the company's PaaS account. The Node-RED Dev package deploys Node-RED on a Node.js container with persistent flows, editor authentication and HTTPS.

The afternoon: four flows

  1. Ingest. An MQTT-in node subscribes to plant/+/state and plant/+/spindle on the broker's internal hostname. A function node normalises the gateways' two slightly different JSON shapes into one.
  2. Store. A PostgreSQL node, added to the environment from the topology wizard, receives each reading through the community PostgreSQL palette node; a table per signal with a timestamp index. Inserts are batched every five seconds to keep the database happy.
  3. Show. The Node-RED dashboard palette renders a page per machine: current state, spindle load gauge, an hourly utilisation chart from a PostgreSQL query node. The dashboard is served on the same HTTPS domain as the editor, on a path.
  4. Alert. A machine that reports fault or goes silent for five minutes triggers a flow that posts to the maintenance team's chat channel and, during night shift, sends an SMS through an HTTP request to the company's SMS provider.

By 17:00 the plant manager was looking at twelve machines on a screen for the first time. Everything so far is Node-RED's own strength. What follows is the platform's.

Making it not a development environment

The package is labelled Node-RED Dev, and the engineer treats the label as a checklist rather than a warning.

Why PostgreSQL beside Node-RED, not inside it

Node-RED's own context store can hold state, and beginners keep readings there until the memory runs out. Twelve machines at a reading a second is a million rows a day, and that belongs in a database with an index. A platform PostgreSQL node in the same environment group is reached over the internal network, scales vertically as the tables grow, and is backed up nightly by the Database Backup/Restore add-on. The engineer adds a monthly partitioning scheme and a retention job in Node-RED itself: a scheduled flow that drops partitions older than two years, which is the company's record-keeping requirement.

ComponentRuns onRoleCloudlets (typical)
MosquittoExisting broker nodeMachine telemetry in2 to 4
Node-REDNode.js container, persistent flowsIngest, transform, dashboard, alerts3 to 8
PostgreSQLDatabase nodeTime-series storage, partitioned4 to 10
Backup StorageStorage nodeNightly dumpsDisk only

Node-RED or n8n for this job

The company also runs n8n for business automation, and the engineer was asked why not use it here. The answer is the shape of the work. Node-RED was built for event streams and protocols: its MQTT, serial, Modbus and OPC UA nodes are first-class, message flow is continuous, and latency from a machine fault to an alert is milliseconds. n8n excels at connecting SaaS applications and AI workflows with rich prebuilt integrations, in discrete executions. Machines to dashboard is Node-RED's job; the weekly production report emailed to the finance system is n8n's, and the two hand off through the same PostgreSQL.

Scaling and cost

Node-RED is a single Node.js process, and for twelve machines it barely notices; the container sits at 3 cloudlets (a cloudlet is 128 MiB of RAM plus 400 MHz of CPU) and rises to 8 when the dashboard's hourly charts recompute, with vertical scaling handling it. When the second plant's forty machines are added next year the engineer's plan is a second Node-RED instance per plant, cloned from this one, rather than one enormous flow, because clones are minutes and cost by the hour. The whole stack, broker included, runs at about 14 cloudlets an hour on average, roughly $34 a month before discounts at MassiveGRID's published $0.003372 per cloudlet-hour. The screen on the plant floor cost more than the first year of the system behind it.

Frequently Asked Questions

Can Node-RED talk to PLCs directly without MQTT?

Yes. Community palette nodes exist for Modbus TCP, OPC UA, Siemens S7 and others. They need a network path from the Node-RED node to the PLCs, which usually means a VPN or gateway from the plant network to the platform; publishing through an MQTT gateway on site is the more common and more robust pattern.

How do I back up Node-RED flows?

Enable the projects feature and commit to Git, which gives history and review as well as backup. The flows and credentials files also live on the node's persistent storage, which the platform snapshots, and a clone of the environment is a full copy.

Is the dashboard suitable for a plant-floor display?

Yes. Node-RED's dashboard is a responsive web page; a browser in kiosk mode on the floor display shows it. Restrict access with the container firewall to the plant network rather than exposing it publicly, and use a read-only dashboard user if your flows write commands to machines.

From machines to a screen, this afternoon

Deploy Node-RED on MassiveGRID PaaS beside a Mosquitto broker and a PostgreSQL node, all on one internal network, with persistent flows, HTTPS and per-cloudlet-hour billing. Free 14-day trial, no credit card.

Node-RED on MassiveGRID PaaS

Further Reading