Search code examples
scalingadd-onjelastic

Effects of installing add-on on a stateful horizontal scaled node


I am interested on the effects of installing an add-on on a stateful horizontally scaled node. When a node is scaled and has 3 nodes (1 master and 2 regular), does the installed add-on only have effect on the Master node or is it installed on the regular nodes too? If not, can we explicitly install an add-on on a regular node? Could not find information about this situation on the documents.


Solution

  • This is somewhat defined by the add-on itself depending on what it has defined in its onBeforeScaleOut and onAfterScaleOut event handlers.

    Ideally, every add-on should be written with those handlers in place (or appropriate behaviour without the necessity of those handlers), but in practice that's not guaranteed... depends entirely on the author.

    If we assume that the add-on in question did not define what should happen, stateful scaling means that the entire filesystem of the master node will be copied - so any configuration files or system packages that were deployed on the master node by the add-on will also appear on the newly horizontally scaled node.

    The documentation mentions a warning for the inverse scenario (applicable for stateless scaling):

    • add-ons - any add-ons installed on the layer won’t be available

    Edit to address the question clarification from the comment:

    I was not so interested of up or down scaling. I am interested at the effects of installing the add-on (with a manifest) on a stateful, horizontally scaled node.

    Stateful vs. stateless only matters during scaling - it describes how they are created (for existing nodes, it doesn't matter how they were created; they are treated the same way).

    As far as I know it is installed exclusively on the master node, but I want to be sure and also if it is possible to force it to install on the regular nodes.

    This depends entirely on the add-on and how it targets its operations. It can be designed to only execute commands / install things on the master node for a given layer, or it can be designed to work on all nodes within the layer (or environment).

    The JPS scripting behind each add-on is usually open source. You can find some examples at https://github.com/jelastic-jps but I recommend to address your question to the add-on author (or your Jelastic provider, if it's one that they provide you with by default).