Hello Everyone.
I have come across a very interesting use case, where we have streaming servers running on custom protocol on backend and those are exposed to clients on front end over gRPC protocol.
End User (gRPC/Proto) ->>>> (Tyk GW) – (Tyk Middleware Plugin) ----> Streaming backend (Custom proto)
The way, I have implemented is by developing golang plugin handling the Custom proto streaming to gRPC streaming.
I have used, golang grpc.ServeHTTP() methods, where we are using existing http request /response handlers, serving over gRPC.
The issue I am facing is, this mechanism works perfect for gRPC unary ops. However, for streaming ops, I am facing issue with tyk is not flushing the streams before actuall accumulated data is NOT more than 4096 bytes. I need the stream data be flushed out immediately.
I tried several options on
1. Setting up http/ grpc WriteByfferSize to the minimal values.
2. Flusher methods are NOT implemented on the wrapper, so could not use it
Any help by any means is appreciated.