Skip to content
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

Can gobetween handle the following use case? #296

Open
yehudacohen opened this issue Sep 13, 2020 · 0 comments
Open

Can gobetween handle the following use case? #296

yehudacohen opened this issue Sep 13, 2020 · 0 comments

Comments

@yehudacohen
Copy link

Hoping you can help me with this query. I have a selection of micro-backends deployed per customer as containers on Amazon ECS. These customers each have a public hostname they use to access their respective micro-backend.

Currently we are using Amazon’s ALB to dispatch to these services, but each load balancer listener has a maximum of 100 rules that can dispatch traffic. As such we are managing multiple load balancers, and this something I’d rather not do. We are expecting to onboard thousands of customers and are in the process of automating the onboarding workflow.

One solution I thought of was to enable service discovery for each of these micro-backends to create an internal SRV record with a domain name that can be inferred from the public hostname. For example: https://customer-a.mypublicdomain.com to http://customer-a.myinternal.domain.

I’d then like to point each public hostname to a single reverse proxy (preferably configured with gobetween). The reverse proxy would then forward the request from the public endpoint to the internal domain name by rewriting the Host header replacing mypublicdomain.com with myinternal.domain. It would then resolve the SRV record for myinternal.domain using a resolver DNS and forward the traffic to the internal micro-backend.

In this configuration, I’m looking to have gobetween rewrite the url and then reresolve the rewritten url with a provided DNS rather than setting up a thousand backends and having to provide server configuration.

I was thinking that the exec discovery backend would be good for this if I can pass it an incoming request as an argument and have the backend invoke the exec function every request. Not sure if or how this is possible though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant