mountebank icon indicating copy to clipboard operation
mountebank copied to clipboard

Creating & deleting imposters in a load balanced setup

Open mike-gore-cko opened this issue 2 years ago • 1 comments

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 image

Steps to reproduce

Creation

  1. 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
  2. Create an imposter on one of the nodes
  3. Perform a get on the imposter you just created on the other nodes

Deletion

  1. 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
  2. Delete an imposter on one of the nodes
  3. 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

Log contents here

mike-gore-cko avatar Oct 24 '22 15:10 mike-gore-cko

This issue caused us to abandon our mountebank efforts.

btull89 avatar Feb 15 '24 17:02 btull89