Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sqs: add ability to define the external port #1047

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

Merged
merged 1 commit into from
Dec 9, 2018

Conversation

nemtsov
Copy link
Contributor

@nemtsov nemtsov commented Dec 8, 2018

First, thanks for your amazing work on localstack!

Please treat this as a start of a conversation rather than a full-featured PR. I'm not certain that this is the right direction and would love your feedback.

Motivation

The issue I'm having is that I'm running localstack behind a proxy, which is running on a specific host (which is covered by HOSTNAME_EXTERNAL, but is also on a different port from that of the proxy. So, when SQS returns the queue URL it returns the HOSTNAME_EXTERNAL that I set, but returns the local port and not the port that the client requests the proxy with.

[proxy:80] -> [localstack:4576] -> [elasticmq:4561]

What I've done at the moment, is I've set my SQS port to :80 (which is what my proxy wants). This works, but in my opinion is more of a workaround because any other service needs to return a URL pointing back to itself, I will not be able to also put it on :80 as it will be taken by SQS.

Proposed solution

So, the solution I'm proposing is to define a <SERVICE>_PORT_EXTERNAL and use that along with HOSTNAME_EXTERNAL. Alternatively (and if there are no plans to use HOSTNAME_EXTERNAL as a single external hostname for all services) we can change it to something like <SERVICE>_EXTERNAL_URI, which would be a host:port combination specific to a service.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 76.624% when pulling 8e361c5 on nemtsov:master into 6049a78 on localstack:master.

@whummer
Copy link
Member

whummer commented Dec 9, 2018

LGTM. Thanks a bunch for updating the PR @nemtsov !

@whummer whummer merged commit 9ba5cce into localstack:master Dec 9, 2018
Stovoy pushed a commit to Nextdoor/localstack that referenced this pull request Feb 27, 2019
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

Successfully merging this pull request may close these issues.

3 participants