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

feat(docs): add guide to consolidate lambdas for cold starts via platform #5668

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ekeren
Copy link
Collaborator

@ekeren ekeren commented Feb 11, 2024

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

@monadabot
Copy link
Contributor

monadabot commented Feb 11, 2024

Thanks for opening this pull request! 🎉
Please consult the contributing guidelines for details on how to contribute to this project.
If you need any assistence, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @eladb
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @skorfmann
Wing Playground @eladcon

@eladcon eladcon changed the title feat(doc): add guide to consolidate lambdas for cold starts via platform feat(docs): add guide to consolidate lambdas for cold starts via platform Feb 11, 2024
@monadabot
Copy link
Contributor

monadabot commented Feb 11, 2024

Benchmarks

Comparison to Baseline ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 59ms±0.57 59ms±0.64 +0ms (+0.77%)⬜
functions_10.test.w -t sim 682ms±43.07 639ms±5.85 -43ms (-6.26%)⬜
functions_10.test.w -t tf-aws 2327ms±8.52 2361ms±16.97 +33ms (+1.43%)⬜
functions_1.test.w -t sim 532ms±5.28 539ms±5.25 +6ms (+1.19%)⬜
functions_1.test.w -t tf-aws 963ms±5.37 968ms±4.15 +5ms (+0.55%)⬜
hello_world.test.w -t sim 531ms±3.37 536ms±5.86 +5ms (+0.97%)⬜
hello_world.test.w -t tf-aws 1674ms±21.85 1674ms±11.59 0ms (-0.02%)⬜
jsii_small.test.w -t sim 499ms±3.88 500ms±5.91 +1ms (+0.14%)⬜
jsii_small.test.w -t tf-aws 728ms±11.73 720ms±5.29 -9ms (-1.18%)⬜
jsii_big.test.w -t sim 2941ms±11.13 2935ms±11 -6ms (-0.2%)⬜
jsii_big.test.w -t tf-aws 3149ms±13.77 3160ms±8.21 +11ms (+0.35%)⬜
empty.test.w -t sim 497ms±4.76 498ms±3.07 +1ms (+0.12%)⬜
empty.test.w -t tf-aws 710ms±5.11 713ms±7.84 +4ms (+0.54%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 59ms 59ms 62ms 1ms 1ms
functions_10.test.w -t sim 639ms 626ms 648ms 6ms 8ms
functions_10.test.w -t tf-aws 2361ms 2332ms 2409ms 17ms 24ms
functions_1.test.w -t sim 539ms 530ms 553ms 5ms 7ms
functions_1.test.w -t tf-aws 968ms 960ms 980ms 4ms 6ms
hello_world.test.w -t sim 536ms 526ms 551ms 6ms 8ms
hello_world.test.w -t tf-aws 1674ms 1645ms 1700ms 12ms 16ms
jsii_small.test.w -t sim 500ms 483ms 508ms 6ms 8ms
jsii_small.test.w -t tf-aws 720ms 708ms 734ms 5ms 7ms
jsii_big.test.w -t sim 2935ms 2907ms 2951ms 11ms 15ms
jsii_big.test.w -t tf-aws 3160ms 3139ms 3182ms 8ms 11ms
empty.test.w -t sim 498ms 493ms 504ms 3ms 4ms
empty.test.w -t tf-aws 713ms 697ms 734ms 8ms 11ms
Last Updated (UTC) 2024-02-11 18:01

Copy link
Collaborator

@hasanaburayyan hasanaburayyan left a comment

Choose a reason for hiding this comment

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

Didnt get a chance to actually read the custom APi and custom Function resources yet but I love the concept.

keywords: [Lambda, API Gateway, Cold Start, Provisioned Concurrency]
---

This post demonstrates how you can leverage the Wing platform to aggregate Lambda functions, thus optimizing both costs and deployment time by using a single Lambda for multiple endpoints.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This post demonstrates how you can leverage the Wing platform to aggregate Lambda functions, thus optimizing both costs and deployment time by using a single Lambda for multiple endpoints.
This post demonstrates how you can leverage a Wing platform to aggregate Lambda functions, thus optimizing both costs and deployment time by using a single Lambda for multiple endpoints.


This post demonstrates how you can leverage the Wing platform to aggregate Lambda functions, thus optimizing both costs and deployment time by using a single Lambda for multiple endpoints.

We address the issue of the high costs associated with provisioned concurrency as a solution to the cold start problem.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
We address the issue of the high costs associated with provisioned concurrency as a solution to the cold start problem.
We address the issue of high costs associated with provisioned concurrency as a solution to the cold start problem.

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.

None yet

4 participants