Handling database connections

Hi,

I am performing MySQL database updates from several Nodes, just wondering if there is any advantage in how this is handled in terms of speed and queuing of tasks. There could end up being a few dozen update nodes with potentially a high volume of traffic.

The two examples below;

I assume the bottleneck you are concerned about is database throughput, as the internal Node-RED messaging seems to scale well (and offers various settings in settings.js).

Typically in DB nodes, each node maintains its own channel/connection to the DB (using common credentials from a config node or context vars).

So it's an optimization tradeoff, which can also be constrained by the DB configuration: max number of connections, max query size, max throughput per connection etc.