kong icon indicating copy to clipboard operation
kong copied to clipboard

feat(wasm): add support for wasmtime cache

Open flrgh opened this issue 1 year ago • 3 comments

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

flrgh avatar Apr 24 '24 23:04 flrgh

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

brentos avatar May 23 '24 00:05 brentos

@brentos

765baba47d1f92d83094315a0e349880fdf08eed 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.

flrgh avatar May 23 '24 17:05 flrgh

@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!

brentos avatar May 23 '24 18:05 brentos

@locao / @kikito I could use help getting a second reviewer for this

flrgh avatar Jun 03 '24 17:06 flrgh

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12930-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12930-to-master-to-upstream
git checkout -b cherry-pick-12930-to-master-to-upstream
ancref=$(git merge-base 4052fbbfee77be52bcd5c876719a84bcbc8ba337 296ccb531a142cc5dafc428e24af60646de84372)
git cherry-pick -x $ancref..296ccb531a142cc5dafc428e24af60646de84372

team-gateway-bot avatar Jun 05 '24 16:06 team-gateway-bot

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12930-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12930-to-master-to-upstream
git checkout -b cherry-pick-12930-to-master-to-upstream
ancref=$(git merge-base 4052fbbfee77be52bcd5c876719a84bcbc8ba337 296ccb531a142cc5dafc428e24af60646de84372)
git cherry-pick -x $ancref..296ccb531a142cc5dafc428e24af60646de84372

Manually cherry-picked: https://github.com/Kong/kong-ee/pull/9389

flrgh avatar Jun 05 '24 17:06 flrgh