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

Skip to content

Migrate lambda executor endpoints from flask to router #7039

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 2 commits into from
Oct 19, 2022

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Oct 18, 2022

Motivation

We are currently spawning a new flask server for every runtime environment. This is both costly and cannot be shutdown easily, also in need of a lot of tcp ports which can lead to problems when not all ports are accessible from other containers.

Changes

  • Instead of an own port, every request now goes to the edge port.
    The urls will therefore change from {LOCALSTACK_IP}:{RANDOM_PORT}/... to {LOCALSTACK_IP}:{EDGE_PORT}/_localstack_lambda/{ENVIRONMENT_ID}/.... This can be done without needing to change the runtime init binary.
  • Use of the localstack router instead of flask

Pair programming with @thrau

@dfangl dfangl requested a review from thrau October 18, 2022 16:32
@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 16:32 Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 16:40 Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it

@github-actions
Copy link

github-actions bot commented Oct 18, 2022

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 14m 9s ⏱️ - 1m 10s
1 410 tests ±0  1 226 ✔️ ±0  184 💤 ±0  0 ±0 
2 008 runs  ±0  1 592 ✔️ ±0  416 💤 ±0  0 ±0 

Results for commit c9d3e04. ± Comparison against base commit c19e69c.

♻️ This comment has been updated with latest results.

Copy link
Member

@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@dfangl dfangl force-pushed the lambda-router-migration branch from 739f081 to c9d3e04 Compare October 19, 2022 09:14
@dfangl dfangl temporarily deployed to localstack-ext-tests October 19, 2022 09:14 Inactive
@dfangl dfangl merged commit bd640bf into master Oct 19, 2022
@dfangl dfangl deleted the lambda-router-migration branch October 19, 2022 12:55
cmoralesmx pushed a commit to cmoralesmx/localstack that referenced this pull request Oct 24, 2022
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