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

Support gRPC/protobuf for RESTful APIs and node-to-node communication #1287

Open
anasalkouz opened this issue Sep 23, 2021 · 20 comments
Open
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request

Comments

@anasalkouz
Copy link
Member

Replace REST/JSON-based API with gRPC/protobuf to improve serialization/deserialization performance.
Ref: https://grpc.io/docs/what-is-grpc/introduction/

@AmiStrn
Copy link
Contributor

AmiStrn commented Sep 24, 2021

Would this also help with streaming rather than doc by doc or bulk indexing?

@penghuo
Copy link
Contributor

penghuo commented Apr 8, 2022

Would gRPC also benefit node-to-node communication?

@anasalkouz
Copy link
Member Author

Would gRPC also benefit node-to-node communication?

Sure, this should help in both node to node communication (Internal) and client to server communication (External).

@anasalkouz anasalkouz added the enhancement Enhancement or improvement to existing feature or request label Apr 12, 2022
@dblock
Copy link
Member

dblock commented Apr 13, 2022

@saratvemulapalli This becomes theoretically swappable via the extensions work, doesn't it?

@anasalkouz
Copy link
Member Author

Based on my understanding of how the internal communication between the node works now, it's using a single transport layer and it should be easy to change how to works. @mch2 please keep me honest.

@saratvemulapalli
Copy link
Member

@dblock Extensions are being built over transport (layer-4), GPRC/Protobuf operate atleast at layer 5.
Extensions are adaptable to new communication mechanisms.

@anasalkouz that is correct. Netty4 transport is the module which implements transport in OpenSearch via NIO. This is swappable with new communication mechanisms. Netty4 also includes Layer 7 (HTTP) support.

@anasalkouz
Copy link
Member Author

Shall we swap Netty4 with gPRC vs upgrading to Netty 5 ?

@dblock
Copy link
Member

dblock commented Apr 20, 2022

Shall we swap Netty4 with gPRC vs upgrading to Netty 5 ?

Yes! I would enable that as an option/experiment and benchmark it.

@saratvemulapalli
Copy link
Member

saratvemulapalli commented Mar 27, 2023

Opened up a RFC for Protobuf in OpenSearch: #6844

@navneet1v
Copy link
Contributor

@dblock is there a separate issue to track the gRPC protocol integration in OpenSearch? or it is already done?

@saratvemulapalli
Copy link
Member

@navneet1v there isn't one. We could use this issue to track.
cc: @VachaShah

@navneet1v
Copy link
Contributor

@saratvemulapalli if we are using this issue to track can we add more details in the description around what we are doing and all the tasks which are tracking for this.

@Bukhtawar
Copy link
Collaborator

Just so as to clarify we are only evaluating the data serialisation protocol(protobuf/avro/ion) etc and not really the transport layers like Netty/gRPC etc

@saratvemulapalli
Copy link
Member

@navneet1v as @Bukhtawar said there is no body working on transport protocol yet (like GPRC). @VachaShah is exploring different serialization/de-serialization mechanisms we can adopt for OpenSearch.

Do you see a use case for gRPC? What are you looking for ?

@navneet1v
Copy link
Contributor

What I am looking for is a light weight protocol than HTTP. While doing a search we spend a significant amount to time at this HTTP layer so, my thinking was how we can replace this so that we can get better query latencies.

@Bukhtawar
Copy link
Collaborator

Bukhtawar commented Jun 17, 2023

@navneet1v to clarify, we use TCP for node to node communication, did you mean HTTP at the REST layer? Might be good to see some profiling results nonetheless based on your observation

@anirudha
Copy link

Ideally i would like to see support for Apache Arrow 0-copy via any http/2 transport

@anirudha
Copy link

@anasalkouz this way you remove the need for serDeSer but; this might need more extensive changes.
https://arrow.apache.org/docs/format/Flight.html

@Bukhtawar
Copy link
Collaborator

@anirudha Netty(default HTTP/transport) already supports zero-copy. Lets not complicate this issue further

@dblock dblock changed the title Using gRPC/protobuf Support gRPC/protobuf for RESTful APIs Jun 21, 2023
@dblock dblock changed the title Support gRPC/protobuf for RESTful APIs Support gRPC/protobuf for RESTful APIs and node-to-node communications Jun 21, 2023
@dblock dblock changed the title Support gRPC/protobuf for RESTful APIs and node-to-node communications Support gRPC/protobuf for RESTful APIs and node-to-node communication Jun 21, 2023
@dblock
Copy link
Member

dblock commented Jun 21, 2023

I've renamed this issue to "Support gRPC/protobuf for RESTful APIs and node-to-node communication". I think we want it all, including _bulk support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request
Projects
Status: New
Status: Todo
Development

No branches or pull requests

8 participants