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

fix(proxy-wasm) improve instance recycling robustness #407

Closed
wants to merge 2 commits into from

Conversation

thibaultcha
Copy link
Member

@thibaultcha thibaultcha commented Sep 5, 2023

  • Allow for recycling the root instance (not managed by isolation modes)
  • Allow for smoother recycling of http instances (including when the root instance has trapped)
  • Also recycle trapped instances in the busy queue
  • Less verbose context creation of fresh and/or recycled instances starting in atypical steps (e.g. on_response_headers).

@thibaultcha thibaultcha added the pr/work-in-progress PR: Work in progress label Sep 5, 2023
@thibaultcha thibaultcha force-pushed the fix/proxy-wasm-instance-recycling branch 5 times, most recently from 4eef75a to 73e76db Compare September 7, 2023 05:43
* Allow for recycling the root instance (not managed by isolation modes)
* Allow for smoother recycling of http instances (including when the
  root instance has trapped)
* Also recycle trapped instances in the busy queue
* Less verbose context creation of fresh and/or recycled instances
  starting in atypical steps (e.g. on_response_headers).
Prior, the sweeping queue was only destroyed at worker shutdown, but it
was intended for it to be sweeped sooner.

This gets away with the sweeping queue and frees instances on the sport
instead.
@thibaultcha thibaultcha force-pushed the fix/proxy-wasm-instance-recycling branch from 125ee47 to 34ee461 Compare September 7, 2023 16:19
@thibaultcha
Copy link
Member Author

thibaultcha commented Sep 12, 2023

This turned into what is currently a pretty heavy refactor of the proxy-wasm instance/context relationship, which was still unfinished (had lots of leftover code from before ictx, which makes the handling of root/filter contexts inconsistent). It is needed for current improvements like aimed by this PR, and future instance pooling mechanisms.

@thibaultcha
Copy link
Member Author

Moved to #422.

@thibaultcha thibaultcha deleted the fix/proxy-wasm-instance-recycling branch September 29, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/work-in-progress PR: Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant