rpc: support an empty "Not Modified" response
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
This is a re-framing of #7968.
When an RPC blocking query between the client and server times out (because there were no changes) the server sends back a full response. Instead of sending back the full response it could send an empty response with a `NotModified` field in the response metadata set to `true`.
This change would improve the performance of both the client that made the RPC request and server handling the RPC request, because both have to spend time serializing and deserializing data that the client already had.
Note that streaming may replace use of blocking queries, however this is a much easier change to make, so might be a good option until streaming is implemented for all endpoints.
### Implementation
Support for this feature was started in #8215. That PR only adds support to the server side of the RPC request, and only for two endpoints. #8245 adds support to the cache for those two endpoints, but not for API requests made without the cache.
TODO:
* [ ] Add support for to all rpc blocking queries (not necessarily all at once)
* [ ] Add support for all cache types. That work is largely done in #8513, but not yet merged
* [ ] Add support to the HTTP API, which likely depends on #10170
Contributor guide
Assessment
This issue has not been assessed yet.