Belyenochi edited a comment on issue #34:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/34#issuecomment-1035851566


   > Thanks for your design. My original thought is simpler: we can add a 
method in the Request to return a Context. It works like the one from the 
standard library: https://pkg.go.dev/net/http#Request.Context.
   > 
   > People can fetch it only when they need the Context. And the timeout of 
Context is slightly smaller than 60s so people can still break the execution 
with a custom response before the actual timeout.
   > 
   > There is a tricky place: the timeout of Nginx is per-operation, so when we 
communicate with Nginx again in
   > 
   > 
https://github.com/apache/apisix-go-plugin-runner/blob/6bb1c4bd98ec374638af7ed02931e0efb2604044/internal/http/request.go#L326
   > 
   > 
   > the timer will be reset. Maybe we can handle this in a separate PR.
   
   There is a doubt, although we have added a timeout context to the Request, 
but if the plugin written by the user does not handle this context, it will 
still cause a timeout


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to