-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route to proxy based on path #413
Comments
Hi there,
The proxy stub is specific to a single downstream service, and uses the
imposter port to simulate that downstream service when it's being replayed.
I can think of a couple options that may get you what you need:
- Create a separate reverse proxy (outside of mountebank) that routes
based on path. You may already have this in your load balancer, etc, for
example that routes https://api.com/dogs/123 to the dogs service and
https://api.com/cats/123 to the cats service. That provides one domain
that mountebank can proxy, hiding the complexity of your service
decomposition.
- Or, create some additional automation that explodes a simple
configuration into the config mountebank requires. For example, you could
have some simply key-value properties file that maps a downstream domain to
an imposter port, and a script that transforms that into a series of proxy
stubs that mountebank can interpret.
Hope this helps,
-Brandon
…On Wed, May 1, 2019 at 3:54 PM Alexander Wolden ***@***.***> wrote:
Hello,
We are looking at implementing Mountebank as our main VCR-like
virtualization tool. However, most of our microservices are actually
located on different domains. With other tools like sepia we can spin up
one proxy server and route based on path:
https://github.com/linkedin/sepia#url-and-body-filtering. Does mountebank
support this behavior where we have one proxy(stub) that can route to
multiple downstream services, or would we have to spin up a separate proxy
on a new port for every service?
Thanks, and good job on the awesome library!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#413>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAARFP4LN3GUC2LMGW2R7BTPTH7ORANCNFSM4HJX72DA>
.
|
@awolden I'd love to compare notes with you all at some point. We are working on this at Yelp too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
We are looking at implementing Mountebank as our main VCR-like virtualization tool. However, most of our microservices are actually located on different domains. With other tools like sepia we can spin up one proxy server and route based on path: https://github.com/linkedin/sepia#url-and-body-filtering. Does mountebank support this behavior where we have one proxy(stub) that can route to multiple downstream services, or would we have to spin up a separate proxy on a new port for every service?
Thanks, and good job on the awesome project!
The text was updated successfully, but these errors were encountered: