You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MVPMinimum Viable ProductfeatureA new featurehelp wantedNot actively being worked on. If you plan to contribute, please drop a note.large effortLikely over a week of development effort
I dont know that do you have any plan to support gRPC besides http?
Thanks,
Reacted by Thang Chung, Thomas Stegemann, Khushal Patel, Khalil Mohammad Mirza, Varorbc, Ethan Wu, Vincent DARON, PYGYME, Postlagerkarte, Adam Bajguz and 6 more
@tungphuong I don't think gRPC is compatible with the idea of an API gateway like Ocelot. Ocelot has no schema whereas gRPC enforces a schema between upstream and downstream services. Also gRPC can use http as a transport so its not really besides :o
@tungphuong I would suggest looking at that! I will keep this issue open and reference that project in the Ocelot docs for anyone else looking to use grpc.
Reacted by Thomas Stegemann, Peyman Ebrahimi, Loc and Raman Maksimchuk
@TomPallister - Hey Tom, any plan to support gRPC in Ocelot? - I'm thinking it'd be a great feature to be able to use Ocelot as a gateway (in addition to pure gRPC re-directions).
Gateway meaning that external communication from Ocelot to client apps could be using HTTP, but from Ocelot to the internal microservices it'd be using gRPC.
Asking about Ocelot's implementation because the mentioned gateway above hasn't been updated in the last 8 months..
Thoughts?
Reacted by Jesus Angulo, Thang Chung, Khalil Mohammad Mirza, Thomas Stegemann, Vincent DARON, Maksym Koshovyi, Shittu Olugbenga, Loc and Raman Maksimchuk
@CESARDELATORRE I agreed with you. Because of .NET Core 3.0 comes a long with gRPC out of the box so that we need to have some way to forward the gRPC Request into the internal microservices. Just like envoy-filter with grpc transcode. Let me know how do you think? @TomPallister
@thangchung I have same issue so i have followed your approach and implemented exactly but getting error as below Status(StatusCode=Internal, Detail="Error starting gRPC call: The SSL connection could not be established
I have tried to fix it but it seems the certificate is not trusted can you please help me to solve the issue.
I'm not sure I understand your concerns. When Ocelot is used with its own load balancer, grpc client load balancer is an obvious choice. Otherwise, the user should be aware of grpc long-living connections and can use 3rd party solution (we are using LinkerD in k8s, for example).
Regarding streaming scenario: every stream will be load balanced. If your conserns about load balancing within a single stream, than this doesn't make sense in general scenario and it's not something grpc supports. Once the stream is started it will work against the same server until the stream is finished.
This only will work for scenario where gRPC request-reply pattern of messaging is used. gRPC Json transcoding will not be available for gRPC Streaming scenario like file upload and download. How do we handle those kind of patterns if we do not have the load balancing
Oh. You probably talked about this. Starting .NET 7 there is a transcoding support from Microsoft which also supports server streaming.
I'm not sure I understand your concerns. When Ocelot is used with its own load balancer, grpc client load balancer is an obvious choice. Otherwise, the user should be aware of grpc long-living connections and can use 3rd party solution (we are using LinkerD in k8s, for example). Regarding streaming scenario: every stream will be load balanced. If your conserns about load balancing within a single stream, than this doesn't make sense in general scenario and it's not something grpc supports. Once the stream is started it will work against the same server until the stream is finished.
I think I will elaborate a little bit but that is going to be a long post. I'm looking at a scenario where without a http middle layer Ocelot should do the load balancing. Ocelot can itself acts as a client and then do a client load balancing that is one options. Ocelot should also be sensitive as to whether it is going to load balance a streaming request or Request Reply messaging protocol. Doing later is easy former is difficuilt. For that we can even say that we have to follow some pattern in writing gRPC services, Like allowing for Server side reflection so that the Ocelot can understand the proto contract defined by the gRPC server. We could also say that one service can have endpoints that either follow Request Reply or Streaming and not combine both in one service
⚠️ The Ocelot community should use these links above ☝️ for future gRPC implementations in Ocelot core!
Other custom solutions will be ignored but consideration is possible. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
MVPMinimum Viable ProductfeatureA new featurehelp wantedNot actively being worked on. If you plan to contribute, please drop a note.large effortLikely over a week of development effort
Activity
TomPallister commentedon Sep 28, 2018
@tungphuong I don't think gRPC is compatible with the idea of an API gateway like Ocelot. Ocelot has no schema whereas gRPC enforces a schema between upstream and downstream services. Also gRPC can use http as a transport so its not really besides :o
geffzhang commentedon Oct 2, 2018
@tungphuong support grpc https://github.com/BuiltCloud/Ocelot.GrpcHttpGateway
TomPallister commentedon Oct 2, 2018
@geffzhang that is awesome :)
TomPallister commentedon Oct 2, 2018
@tungphuong I would suggest looking at that! I will keep this issue open and reference that project in the Ocelot docs for anyone else looking to use grpc.
geffzhang commentedon Oct 4, 2018
This is an article about grpc gateway https://www.cnblogs.com/kingreatwill/p/9722963.html
tungphuong commentedon Oct 17, 2018
Many thanks
CESARDELATORRE commentedon Jun 15, 2019
@TomPallister - Hey Tom, any plan to support gRPC in Ocelot? - I'm thinking it'd be a great feature to be able to use Ocelot as a gateway (in addition to pure gRPC re-directions).
Gateway meaning that external communication from Ocelot to client apps could be using HTTP, but from Ocelot to the internal microservices it'd be using gRPC.
Asking about Ocelot's implementation because the mentioned gateway above hasn't been updated in the last 8 months..
Thoughts?
thangchung commentedon Jul 29, 2019
@CESARDELATORRE I agreed with you. Because of .NET Core 3.0 comes a long with gRPC out of the box so that we need to have some way to forward the gRPC Request into the internal microservices. Just like envoy-filter with
grpc transcode. Let me know how do you think? @TomPallisterthangchung commentedon Aug 10, 2019
@TomPallister @CESARDELATORRE @geffzhang Because I have got the same issue that was reported by @tungphuong in my company project so that I have added the filter which can do a transcoder for JSON to gRPC, the code can be found at https://github.com/thangchung/GrpcJsonTranscoder. It will help to add the aggregation layer that config the endpoint of all down stream gRPC services

saitejaprattipati commentedon Apr 1, 2020
@thangchung I have same issue so i have followed your approach and implemented exactly but getting error as below
Status(StatusCode=Internal, Detail="Error starting gRPC call: The SSL connection could not be establishedI have tried to fix it but it seems the certificate is not trusted can you please help me to solve the issue.
Here goes the service code:
Here goes the proto code:
Can you please tell me did you face any issue similar?
11 remaining items
gao-artur commentedon Jun 29, 2023
Check the gRPC client-side load balancing
VenkateshSrini commentedon Jun 30, 2023
doing that now. But I feel it is a overload on client. Also, we may need Ocelot to support the same for streaming scenario
gao-artur commentedon Jun 30, 2023
I'm not sure I understand your concerns. When Ocelot is used with its own load balancer, grpc client load balancer is an obvious choice. Otherwise, the user should be aware of grpc long-living connections and can use 3rd party solution (we are using LinkerD in k8s, for example).
Regarding streaming scenario: every stream will be load balanced. If your conserns about load balancing within a single stream, than this doesn't make sense in general scenario and it's not something grpc supports. Once the stream is started it will work against the same server until the stream is finished.
gao-artur commentedon Jun 30, 2023
@VenkateshSrini commented on June 10, 2023:
Oh. You probably talked about this. Starting .NET 7 there is a transcoding support from Microsoft which also supports server streaming.
VenkateshSrini commentedon Jul 1, 2023
@gao-artur commented on Jun 30, 2023:
Transcoding does not support server side streaming. Only Request reply that is issue why we cannot use Ocelot out of the box
VenkateshSrini commentedon Jul 1, 2023
I think I will elaborate a little bit but that is going to be a long post. I'm looking at a scenario where without a http middle layer Ocelot should do the load balancing. Ocelot can itself acts as a client and then do a client load balancing that is one options. Ocelot should also be sensitive as to whether it is going to load balance a streaming request or Request Reply messaging protocol. Doing later is easy former is difficuilt. For that we can even say that we have to follow some pattern in writing gRPC services, Like allowing for Server side reflection so that the Ocelot can understand the proto contract defined by the gRPC server. We could also say that one service can have endpoints that either follow Request Reply or Streaming and not combine both in one service
raman-m commentedon Jul 1, 2023
@gao-artur and @VenkateshSrini
Why are you discussing here a theory with such long list of messages?
What is outcome of your debates?
I expect concrete user scenario(s) and real PR(s) to this repo.
Please, if you have a real solution, you are welcome to create PR.
It seems I will close this issue soon because I see zero real results of such long discussions.
Or the discussion will be blocked...
@gao-artur wrote on June 29, 2023
Thanks for the link!
I believe we must use this MS Learn doc to integrate gRPC into Ocelot: Call gRPC services with the .NET client
raman-m commentedon Jul 1, 2023
I believe Ocelot team and community should use & go with these official MS Learn docs:
HttpClient)Ocelot team and community should borrow ideas & get some real coding recipes from these solutions and products:
Other custom solutions will be ignored but consideration is possible.
raman-m commentedon Jul 1, 2023
@tungphuong Hi Phuong Le!
Are you interested in contribution and/or discussion?
You are issue reporter, and we must decide what to do with your issue!..
A soonest reply will be much appreciated!