% title = 'FAQs' description = 'Frequently asked questions about using mountebank' %> <%- include('_header') -%>
decorate
behavior for general purpose decoration.
You can inject headers into proxied responses using the
injectHeaders
fieldmb
restarts?--configfile
command line option
It can either be a single file containing the JSON that you get back when you call
GET /imposters?replayable=true
or multiple files that will be collected via templating. Alternatively, starting mb
with the --datadir
command line option will load all previously saved imposters
in the database.injectHeaders
field on the proxy,
add an 'Accept-Encoding: identity' header. That's an HTTP-based way of the proxy client telling
the server that it won't accept compressed data.--datadir
command line option so mountebank doesn't leak memory
during proxy recording or saving requests. You'll also want to use keepalive connections
for HTTP connections, so consider setting the defaultResponse
to make all Connection
headers as Keep-Alive
. As long as you set up each mb
instance with the same configuration, you can run multiple instances behind a load balancer (they should all
share the same volume for the --datadir
option). A common
strategy is to set up a proxy in proxyAlways
or proxyTransparent
mode
and to capture the downstream latency by using the addWaitBehavior
field to the proxy.
When you replay the saved responses, they will add the perform with roughly the same latency the
downstream services had.