You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/03/02 10:49:02 UTC

[GitHub] [apisix] belongwqz opened a new issue #3727: request help: How do I know which node the response came from

belongwqz opened a new issue #3727:
URL: https://github.com/apache/apisix/issues/3727


   ### Issue description
   How do I know which node the response came from, for example:
   The upstream have tow nodes(node1 and node2), how can I judge if the response comes from node1 or node2(such as the response has a cookie `server:node1`)?
   Which plugin can I use?
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):
   * OS (cmd: `uname -a`):
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #3727: request help: How do I know which node the response came from

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3727:
URL: https://github.com/apache/apisix/issues/3727#issuecomment-789378456


   > I mean the upstream info added in the response, not in other log, maybe we need a new plugin, modify the response like `response-rewrite`.
   
   Got it. I think there is no need to add a new plugin, it should be implemented in the response-rewrite plugin.
   @spacewander  What do you think?
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] belongwqz commented on issue #3727: request help: How do I know which node the response came from

Posted by GitBox <gi...@apache.org>.
belongwqz commented on issue #3727:
URL: https://github.com/apache/apisix/issues/3727#issuecomment-789321794


   > I think you can try to use the `kafka-logger` plugin, which will record upstream node information in its `default` format log. Or use the `http-logger` plugin to define `$upstream_addr` in the custom log format to record upstream node information.
   
   I mean the upstream info added in the response, not in other log, maybe we need a new plugin, modify the response like `response-rewrite`.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] imjoey closed issue #3727: allow using variable in the header of reponse-rewrite plugin

Posted by GitBox <gi...@apache.org>.
imjoey closed issue #3727:
URL: https://github.com/apache/apisix/issues/3727


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #3727: request help: How do I know which node the response came from

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3727:
URL: https://github.com/apache/apisix/issues/3727#issuecomment-788814188


   I think you can try to use the `kafka-logger` plugin, which will record upstream node information in its `default` format log. Or use the `http-logger` plugin to define `$upstream_addr` in the custom log format to record upstream node information.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #3727: request help: How do I know which node the response came from

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #3727:
URL: https://github.com/apache/apisix/issues/3727#issuecomment-789472440


   > > I mean the upstream info added in the response, not in other log, maybe we need a new plugin, modify the response like `response-rewrite`.
   > 
   > Got it. I think there is no need to add a new plugin, it should be implemented in the response-rewrite plugin.
   > @spacewander What do you think?
   
   These headers can be controlled in the core. It's not related with response-rewrite.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org