Comments (9)
Hello @acaporrini the Tyk plugin differs from the base middleware (because Tyk plugin doesn't as a basic middleware). I will have to update the plugin with the latest changes from the common middleware. I will have to write more Tyk e2e tests to ensure it has the same behaviour too.
Thank you for trying to use Souin inside Tyk and thank you for your feedback! 🙏
from souin.
Hi @darkweak thank you a lot for quick reply and for looking into this. Do you maybe have an idea on when this will be implemented?
from souin.
Hey @acaporrini I'll wrap the Tyk changes in the PR #335 it may take few days to be merged but I cross my fingers to merge and release before Friday. I don't have much time to work on the missing fix to make the pipeline green.
from souin.
Hello @acaporrini I apologize about my late answer. I don't find a way to handle that (because Tyk doesn't act as a classic middleware). The actual plugin behavior is like:
Tyk gateway request handled
↓
Load plugins
↓
SouinRequestHandler (it will keep in memory the stale response)
↓
Tries to connect to the upstream server
↓
SouinResponseHandler will write the stale response body, headers,...
↓
Writes the upstream response
Actually it writes the body twice (from the upstream and from the stale response)
I cannot short-circuit and I didn't find a way to prevent the body from being filled by the upstream server at the moment.
I don't know how to allow the gw to contact the upstream, serve the response from the cache but doesn't wait and doesn't write the upstream response.
Ping @buger @andyo-tyk @lonelycode @matiasinsaurralde if there is a way to do that.
from souin.
@darkweak wanna jump on quick debugging session? Ping me on [email protected], and we will figure out smth.
from souin.
@buger Did you received my email to plan a debugging session?
from souin.
Weird but no. I just sent you mail to [email protected], to test if all works.
from souin.
Received, I just sent you another mail in response to your.
from souin.
Not possible with the actual middleware implementation in Tyk. Some possible ways we discussed with Leonid are not viable so this feature can not be supported while they're not allowing the asynchronous upstream request in a middleware and return a value before the response from the upstream.
from souin.
Related Issues (20)
- [Traefik plugin] panic after deploy (docker service update) and when doing Apache AB test HOT 15
- Prometheus metrics not incrementing HOT 2
- Add support for in-memory NutsDB HOT 1
- fatal error: concurrent map writes HOT 2
- mode bypass is ignored in global caddy config HOT 1
- Can't be built with FrankenPHP on amd64 HOT 1
- Redis keys not expiring HOT 15
- public,max-age=31536000, immutable HOT 2
- Nginx / apache example HOT 2
- Which one to use with caddy? HOT 2
- Better explanation on mode option HOT 1
- Cache corruption HOT 14
- New cache engine, implementation rueidis
- panic in Caddy plugin HOT 6
- order cache before rewrite - question HOT 1
- API doesn't work if Caddy's hostname is in format of `http://10.0.0.1:8080` rather than `:8080` HOT 5
- Feature request: customization of cache key HOT 8
- Surrogate keys API seems broken with multiple sites HOT 7
- Redis stops working after a short moment? HOT 5
- souin on traefik get api souin url HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from souin.