-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Proposal
With the experiment done for using protobuf in _cat/nodes API (see #6844 (comment)) and a 15-30% improvement depending on the size of the cluster, we can assess the benefits of protobuf for Search API in terms of serialization and de-serialization of the requests and responses in between nodes and at the REST level.
Next Steps
Do a similar experiment for the Search API to understand the performance improvements using protobuf. (This is a work in progress)
Details
In order to experiment and see incremental benefits, some of the classes I am targeting to convert to protobuf: SearchRequest, SearchResponse, SearchPhaseResult, FetchSearchResult, ShardFetchRequest, ShardSearchRequest, QueryFetchSearchResult, QuerySearchRequest, QuerySearchResult. Also, classes related to TransportSearchAction are required to support protobuf requests and responses.
Code changes
The code changes for the experiment are being added in a branch on my fork: https://github.com/VachaShah/OpenSearch/compare/poc-cat-nodes-protobuf...VachaShah:OpenSearch:poc-search-protobuf?expand=1
Sub tasks/Milestones
Next steps as discussed with @msfroh and @getsaurabh02. Let me know if I missed something here.
- Convert
QuerySearchResult,FetchSearchResultandQueryFetchSearchResultinto a proto message and add support to communicate this response between nodes using protobuf bytes. This includes adding support for protobuf in OutboundHandler and InboundHandler. Deliver this as an experimental feature. There will be a feature flag which if enabled will allow node-to-node communication using protobuf. - Add support for aggregations (in QuerySearchResult), NestedIdentity (in SearchHit) and other optional fields in SearchHit as protobuf messages.
- Repeat the same for other search results and requests.
Note: All of the above changes go behind an experimental feature flag. Once the incremental changes are in for the Search API:
- Add backwards compatibility for the node-to-node communication protocols with version checks during node-to-node communication and remove the experimental feature flag.
Related
- RFC: [RFC] Protobuf in OpenSearch #6844
- _cat/nodes POC: Cat Nodes API with Protobuf #9097
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
Status