Important to my work future, Can i use nod-red to make REST API for big websites

Dear node-red community
my question is can I use nod-red to make REST API for big websites, like ERP system for a university, I have used node-red for one year and I love it, making for example

  • The basic system (stores - sales - purchases - accounts)
  • Garage system and personnel affairs
  • Import and documentary credits system
  • Production and Manufacturing System
  • customer management system
  • students management system
  • teacher staff management system
  • notice: that the API will be used by about a million people ???

Unclear what all your use cases are - better spec from you is needed - but one thing to consider before you even think starting, Node-RED does not have a multi-user & multi-tenant support that I would assume is needed when reading the lines you typed. Do you mean you wish to run Node-RED as a layer between end users and all those already present systems listed?

thanks for replying @krambriw
Look I mean I want to make a website, for example, I want to make a forum like "Node-red" forum that use a single database, and users will make a post and reply by using REST API has built by node-red, via http, https ... etc requests, I built CRUD by VueJS templates on server port: 80 and requests go to Node-red REST API on the same server on port: 1880 via Http and https requests and then Node-red response the processed data (Using Node-red as a backend to make processes), I will use nodes in node-red to interact with database methods like (SELECT, INSERT .... etc), write or remove files on the server using node-red ... etc, (nodes benefits) that's what i mean they will using node-reds node via http, https request only not logging to node-red flow editor. I want to use it as a back-end REST API, Am i explaining the issue well?

There is a LOT to your request. And not a simple yes/no answer.

Could it? Yes. Should it? That is a much harder question.

As Walter has said, Node-RED is not really geared up for handling multi-user authentication/authorisation. That may be best done externally to Node-RED (e.g. via a reverse proxy). So Node-RED won't be the only component if you do decide to use it. Security for any web application is fraught with complexity and very easy to get wrong. Please don't underestimate the effort involved.

Then there is the fact that Node-RED, being a Node.js application, may be tricky to scale. It is possible but it may not be simple. So you will need to be prepared to do some testing at scale and learn a lot about how to make performant Node.js applications at scale.

There should be no use of port 80 or HTTP outside the server itself (or possible outside the secure network the server is on).

Yes, well enough.

I don't want to put you off completely but I'll point out 1 last time that you are adding a LOT of complexity by using Node-RED and will actually be getting very little value from it.

That is not putting down Node-RED, simply acknowledging that it is complex. It is great at what it does but it isn't a miracle worker. It is designed to be a generic low-code application platform. Easy of entry is paramount, performance less so.

So Node-RED is an excellent tool for prototyping what you want. And it is certainly possible that it could be performant enough - but that is far from a foregone conclusion. It is dependent on things like:

  • How many users
  • How many users will use the service at the same time
  • How active are those users
  • When active, how many calls to your API's will the users be making
  • How complex are the API calls
  • How much data will the API be handling

I'm sure other people can think of other questions but that should give you an idea anyway.

thanks a lot @TotallyInformation for replying, the question is how can I measure the performance of node-red applications to know if it's good for my project or not?

The usual way is to set up a simulation. Put together a representative system and simulate a reasonable set of clients. Measure the resource utilisation on the test system. From there extrapolate to the expected number of users, etc.

thanks a lot @TotallyInformation , I've spent time searching in the forum and I found a similar discussion

my question is: can node-red REST API handle a million users or more but must use multiple instances?
can you explain to me how it's done?
I searched for node-red multiple instances and i found something like that
node-red -p 1881 -u /home////
node-red -p 1882 -u /home////
node-red -p 1883 -u /home////
is thats mean i make different clone my node-red API in many folders and make it working in different paths?
if its a true, how it does working?
if solving is correct , how can i do that?

You are asking questions for which you need professional help not a free forum.

@TotallyInformation i see , thanks for replies and your time :handshake:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.