nginx / nginx/ngx-rust

Make Buffer Reuse Possible

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
915
Forks
96
Avg merge
5d 22h
Merged PRs (30d)
6

Description

I would like to reuse buffers as described here.

https://nginx.org/en/docs/dev/development_guide.html#http_body_buffers_reuse

This is currently (I think) not possible as the raw ngx_pool_t is private to ngx::core::Pool, so that ngx_chain_get_free_buf and ngx_chain_update_chains can’t be called.

Possible solutions are:

  • Make the ngx_pool_t public, which I assume you don't want to do.
  • Implement the chain creation / update functions on Pool.
  • Something else?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the NGINX development guide section on HTTP body buffer reuse, then inspect ngx::core::Pool and the referenced ngx_chain_get_free_buf and ngx_chain_update_chains functions. Decide which supported API approach fits the binding; done means callers can reuse buffers without requiring direct access to the private ngx_pool_t.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx, rust
Domain
backend, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.