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(wasm): add support for wasmtime cache #12930

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Apr 24, 2024

Loading .wasm module binaries involves a compilation step before they can be executed, which can slow Kong's startup time. This enable's Wasmtime's builtin cache, such that subsequent start/stop/restart cycles can be faster with a warm cache.

See also:

KAG-4372

@github-actions github-actions bot added core/cli core/templates core/configuration cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Apr 24, 2024
@flrgh flrgh force-pushed the feat/wasm-module-cache branch 2 times, most recently from 35d459c to 945dec3 Compare May 6, 2024 23:16
@pull-request-size pull-request-size bot added size/L and removed size/M labels May 6, 2024
@flrgh flrgh force-pushed the feat/wasm-module-cache branch 2 times, most recently from 7a5c92c to 4c9bf05 Compare May 6, 2024 23:37
@flrgh flrgh marked this pull request as ready for review May 6, 2024 23:40
@flrgh flrgh force-pushed the feat/wasm-module-cache branch 3 times, most recently from b431ca9 to 2f034f9 Compare May 20, 2024 15:56
@flrgh flrgh requested a review from brentos May 21, 2024 21:34
@brentos
Copy link
Contributor

brentos commented May 23, 2024

Is it possible to add a test for restarting kong with the cache enabled? Otherwise LGTM

@flrgh
Copy link
Contributor Author

flrgh commented May 23, 2024

@brentos

765baba adds an integration test for start/restart. There's not a lot we can inspect and assert upon without making sketchy assumptions about wasmtime's cache implementation, so this test just checks for anything in error.log that looks like a problem.

@brentos
Copy link
Contributor

brentos commented May 23, 2024

@brentos

765baba adds an integration test for start/restart. There's not a lot we can inspect and assert upon without making sketchy assumptions about wasmtime's cache implementation, so this test just checks for anything in error.log that looks like a problem.

Yeah mainly i wanted to make sure nothing broke by introducing the cache, that things work with existing cache files on restart. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants