Best platform for Node red

This is a question with probably many answers but I'll as anyway.

I'm about to set up a node red system to present dashboards from mainly OPUA and MSSQL data. To host this I'll set up a virtual Linux server.

What experiences does the community have? Which Linux distribution to use? CPU, RAM?
We are probable talking about 300 UPC tags, 30-40 trends, 50 gauges.

Any suggestions?

O

It is quite possible that even a Pi could handle this. So maybe a nano-PC of some kind if you want something more powerful than a Pi3 or equivalent.

Well that is very subjective. The most experience from this community is from Rasbian which is derived from Debian. Dave's Pi installation script is likely to work on a Debian OS. Ubuntu is also derived from Debian so that should also work well. Debian is stable, well supported and relatively light weight; however, it doesn't update very often - of course that is likely to be of benefit to you giving you a stable platform but it is likely that it would mean you would need to take more active charge of some key services such as installing and updating newer versions of Node.js. You wouldn't have those issues as much with Ubuntu.

If you don't need the desktop, either don't start it or chose a variant that doesn't include it.

If you end up with a platform with sufficient spare capacity, I would personally also recommend installing webmin. This gives you a web interface for managing Linux. In particular though, it gives you the ability to configure it such that it will auto-update Linux software packages for you which can be a reasonably large overhead for running Linux servers.

1 Like

If the aim is too just display guages and graphs then Grafana sounds more suitable for your project?

I would use the OS your more familiar with what ever that maybe. I tend to use Docker containers for projects like this.

All of my prod instances are Ubuntu Server on ESX. Resource requirements are fairly low and you're limited to a single thread, so going heavily co-tenant is a good way to squeeze your money's worth out of modern hardware.

1 Like

Sounds like a good idea. I havn't checked Grafana until now but it looks like what I need.

Do you have a sample showing how to get data from Node Red, over to Grafana?

O

Grafana has data sources for MS-SQL (as well as many others), so that's probably the most efficient way? I've not heard of OPUA.

Thank you for this explanation.

In my case the choice will be Ubuntu Server LTS with Node-Red, OpenVPN, MySQL and Webmin.
With this combination, I'll get a long life of Ubuntu in server version so light (no GUI or useless apps) but easy to manage remotely via VPN secure connection.

I'll make a tuto if I have enough time.

I think he meant "OPC UA Server" with OPUA.

I did not know Grafana, I will study that, at first sight, I like it.

I know this question is 4 yld but If it interests some of you, I tested with ModBus TCP communication for about 220 values (2 queries of 120 and 100 registers at time) each second, recording in MySQL database, it works fine and CPU load on Raspberry Pi 4 is 2-5% only.

So Pi4 is enough, but best is to install a SATA SSD on it for database.
We use this solution :

And i install Ubuntu Server on it or in some cases the Pi OS.

My 2 cents about Raspberry pi is that SD cards are sensitive to shutdown and might go corrupt.
There are a lot of similar forum posts about that: https://forums.raspberrypi.com/viewtopic.php?t=311435

In my case, RPi was shutdown every day for a night, so UPS was not an option. Some cards performed better, some worse, but longest I managed to run without SD card fail was ~4months.

For that reason we switched to industrial devices: Siemens IOT2040/2050 or even ipc127e. Price and performance ratio sucks a lot compared to RPi, but when availability is the most important thing it was our way to go and it runs now for 4-5years without a fail

1 Like

Do you mean it was shutdown by powering off, rather than a controlled shutdown? If so then that is a really bad idea. Having said that, having started using good quality cards a few years ago, I have not had a power fail damage a card. I have had maybe a dozen power fails during that time, with six Pis, so a total of maybe 70 power down events.

Yes exactly. Rpi were installed in electrical cabinets to collect data - so if shift finishes, operators powered off whole line with Rpi inside it.
I don't remember the brand of SD cards, but my best result was 4months of power offs for everyday ~ (lets say ~120) until SD card was corrupted for single Rpi. I hope you will outperform it :smiley:

I've noticed more and more blogs about prevention for this issue. In my case this might have been a solution

But that just makes the whole sd-card read-only doesn't it? If so, not much help unless you have another place to write stuff to.

No general purpose computer likes to have its power cut off any any of them can end up with storage corruption if you do. It is simply that devices with more complex storage controllers and more complex filing systems are better at both trying to keep discreet writes, finish writes before power cut and recovering from small corruptions.

A Pi is a bear of simple mind and doesn't have all those features when using an SD-Card.

It seems to me you should have an ups on the pi’s and do a controlled shutdown.

This might help: https://www.pishop.us/raspberry-pi-ups-hat-guide/

Yes, a short term 'UPS' (which is a contradiction in terms of course) which has sufficient capacity to allows the pi time to shut down cleanly before turning itself off is ideal for such situations.

Well most UPS's are short term aren't they - actually a super capacitor would likely be plenty as long as the power cut trigger was responsive enough. It actually doesn't really even need to do a full shut-down, just stop writing to the card - that would be enough.