-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Feature] Prevent running interceptor twice #17
Comments
The interceptor should only run once. There's actually a test for that. Could you post some code and output showing it running twice? |
Hi @d5h , sorry for the long delay in responding. I'm seeing this with the below interceptor:
When I generate a request with this, I see:
|
I don't see anything wrong here. Is this in a production environment with anything like GraphQL or Istio involved? They can make multiple requests to the backend for a single client request. In order to narrow it down as much as possible, could you run the service on your own machine, and make the request from the same machine with something like I don't think this is caused by the interceptor. I've never seen this myself, and as mentioned above, there's a test that it only runs once. I'm guessing there may be something else that's making redundant calls. I'm also curious why the first call was ~700x faster than the second. Are you sure this is the same request? I'd expect the same request to similar response times, unless there's caching involved. But here the first request is faster so caching doesn't make sense. |
The reason for the appearance of a request received by the server twice could be that the first request is a |
It seems this interceptor is run twice for each request. Is it possible to have it run only once, or detect which way the request is going (incoming, outgoing)?
Thanks!
The text was updated successfully, but these errors were encountered: