fatihbm opened a new pull request, #13810:
URL: https://github.com/apache/apisix/pull/13810

   ### Description
   
   Adds the `query-gateway` plugin, an opt-in cache boundary for read-only HTTP 
requests that carry query content in the request body.
   
   The plugin supports both client `POST` and RFC 10008 `QUERY` requests:
   
   - Client `POST` requests are preserved when sent upstream.
   - Client `QUERY` requests are forwarded as `POST` by default for upstream 
compatibility.
   - Routes with upstream `QUERY` support can preserve the `QUERY` method.
   - Equivalent `POST` and `QUERY` query payloads produce the same canonical 
cache key.
   - Cache admission is conservative and explicit; arbitrary POST traffic is 
never cached.
   - Local-memory caching is supported by default, with optional Redis and 
Redis Cluster backends.
   - Redis failures use a bounded local-memory fallback.
   - Cache safety rules exclude unsafe responses and requests with relevant 
cache-control, authorization, cookie, or set-cookie conditions.
   
   This is useful for search, analytics, reporting, Elasticsearch, and 
ClickHouse-style read-only requests. These workloads often use `POST` because 
they require a request body, even when their semantics are safe and idempotent. 
The plugin enables safe caching today without requiring immediate native 
`QUERY` support from every upstream.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #13807
   
   ### Validation
   
   - Added unit and integration coverage for request method handling, canonical 
cache keys, cache admission, cache hit/miss behavior, bypass behavior, and 
fallback behavior.
   - Added an Elasticsearch integration profile that verifies correlated 
client, APISIX, and upstream logs.
   - Verified client `POST` and `QUERY` scenarios, upstream `POST` and native 
`QUERY` forwarding modes, and cache bypass cases.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to