I have setup 3 Mountebank nodes that are load balanced. These all point to a shared storage volume using Amazon EFS. I have set the --datadir to a consistent location across all nodes --datadir /app/efs.
We do not use a config file, so the expected behaviour when I create an imposter is that I create an imposter and then it is available across all nodes of the load balanced cluster.
Similarly I would expect if I delete the imposter that all nodes show the imposter has been deleted.
Actual behaviour
In the creation scenario the imposter is only available on one node. I get a 404 response on the other nodes. The only way to work around this is to create the stub on all cluster nodes. When I do this I can successfully update the stubs within the imposter and that update is then available on all nodes.
In the deletion scenario when deleting, it succeeds. However, when I send requests to get the imposter on a different node it crashes with the following error message
Steps to reproduce
Creation
Create load balanced Mountebank using 3 nodes. Ensure the datadir is configured pointing at shared storage and there are no imposters already in the datadir location
Create an imposter on one of the nodes
Perform a get on the imposter you just created on the other nodes
Deletion
Create load balanced Mountebank using 3 nodes. Ensure the datadir is configured pointing at shared storage and there is an imposter setup in the datadir location
Delete an imposter on one of the nodes
Perform a get on the imposter you just deleted
Software versions used
OS : Linux
mountebank : 2.8.1
Installation method : Docker using the bbyars/mountebank:2.8.1 image
Log contents in mb.log when running mb --loglevel debug
Expected behaviour
I have setup 3 Mountebank nodes that are load balanced. These all point to a shared storage volume using Amazon EFS. I have set the
--datadir
to a consistent location across all nodes--datadir /app/efs
.We do not use a config file, so the expected behaviour when I create an imposter is that I create an imposter and then it is available across all nodes of the load balanced cluster.
Similarly I would expect if I delete the imposter that all nodes show the imposter has been deleted.
Actual behaviour
In the creation scenario the imposter is only available on one node. I get a 404 response on the other nodes. The only way to work around this is to create the stub on all cluster nodes. When I do this I can successfully update the stubs within the imposter and that update is then available on all nodes.
In the deletion scenario when deleting, it succeeds. However, when I send requests to get the imposter on a different node it crashes with the following error message
Steps to reproduce
Creation
Deletion
Software versions used
Log contents in mb.log when running mb --loglevel debug