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/04/01 05:36:03 UTC

[GitHub] [apisix] fukiki opened a new issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

fukiki opened a new issue #3963:
URL: https://github.com/apache/apisix/issues/3963


   ### Issue description
   There was a discussion earlier about `How to distinguish the source of these response status codes `:
   [Issue 2501](https://github.com/apache/apisix/issues/2501) and [PR 2817](https://github.com/apache/apisix/pull/2817).
   
   The conclusion is that: In the response header of the request, through the response header of `X-APISIX-Upstream-Status`, we can effectively identify the source of the `5xx` status code.
   
   About this, I have a question: `Why only distinguish 5xx status codes? `
   
   In some scenarios, the requirement may be how to distinguish the source of status codes 4xx. 
   
   In addition to this, We can rewrite the upstream status codes by APISIX's response-rewrite plugin. In this case, if we can't distinguish the source of the status code,upstream or apisix,it can’t quickly help us determine the problem.
   
   
   Therefore, I would like to ask for some opinions of the community:
   Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code,not only 5xx.
   


-- 
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] fukiki commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   @tokers @imjoey I will send a proposal email to the dev mail list for further discussion.


-- 
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] fukiki commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > Actually, there are a bunch of headers can be added for the debugging purpose:
   > 
   > * X-Upstream-Status, the status code returned by upstream;
   > * X-Upstream-Addr, the upstream endpoint address;
   > * ....
   > 
   > Of course, some information is sensitive, and maybe a switch should be introduced to show these data.
   
   @tokers  That's a good suggestion. 


-- 
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] fukiki commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > > Why only distinguish 5xx status codes?
   > 
   > There are many factors that cause 5xx status codes. We need to distinguish their sources and narrow the scope of the problem. The 4xx status codes are caused by client requests that do not conform to semantic specifications and have obvious prompt information.
   
   The 4xx status codes are not only caused by client requests, such as the following example:
   ![apisix2](https://user-images.githubusercontent.com/59835099/113265426-b45cce80-9306-11eb-9846-e041b4ab10f4.png)
   
   


-- 
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] spacewander closed issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] liangliang4ward commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > I think recording all non-2xx requests and provide a similar header of x-upstream-status is better.
   
   ok, let me try do this


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] Firstsawyou commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > @fukiki @Firstsawyou @tokers
   > 
   > As the `X-APISIX-Upstream-Status` is already supported, so I was wondering that is that possible for us to reach a conclusion that adding `X-APISIX-Upstream-Status` back to the response header for all cases, under the control of a switch.
   > 
   > Thanks.
   
   This looks good, I think it is ok.


-- 
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 #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   >Why only distinguish 5xx status codes?
   
   There are many factors that cause 5xx status codes. We need to distinguish their sources and narrow the scope of the problem. The 4xx status codes are caused by client requests that do not conform to semantic specifications and have obvious prompt 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] imjoey commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > We can send a proposal to the mail list, who wants to do this?
   
   Hi @fukiki , is that possible for you to send a proposal email to the dev mail list for further discussion? We actually need more opinions. Thanks.


-- 
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] fukiki commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > This is more intuitive to know the cause of the problem. Maybe we need to support distinguishing the source of 4xx status codes.
   
   In some special cases, other status codes may have similar problems. 
   Support distinguishing the source of all status codes, will be more generic.


-- 
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 edited a comment on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

Posted by GitBox <gi...@apache.org>.
imjoey edited a comment on issue #3963:
URL: https://github.com/apache/apisix/issues/3963#issuecomment-812273606


   @fukiki  @Firstsawyou @tokers  
   
   As the `X-APISIX-Upstream-Status` is already supported, so I was wondering that is that possible for us to reach a conclusion that adding `X-APISIX-Upstream-Status` back to the response header for all cases, under the control of a switch.
   
   Thanks.
   
   


-- 
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] gxthrj commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   I think recording all non-2xx requests and provide a similar header of x-upstream-status is better. 


-- 
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] spacewander commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   @liangliang4ward 
   Would you like to submit a PR for it?


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   We can send a proposal to the mail list, who wants to do this?


-- 
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 #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   > The 4xx status codes are not only caused by client requests, such as the following example:
   
   This is more intuitive to know the cause of the problem. Maybe we need to support distinguishing the source of 4xx status codes.


-- 
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 #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   Actually, there are a bunch of headers can be added for the debugging purpose:
   
   * X-Upstream-Status, the status code returned by upstream;
   * X-Upstream-Addr, the upstream endpoint address;
   * ....
   
   Of course, some information is sensitive, and maybe a switch should be introduced to show these data.


-- 
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 commented on issue #3963: request help: Distinguish the source (upstream or apisix) of the status code, whether it can be extended to all the status code

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


   @fukiki  @Firstsawyou @tokers  so I was wondering that is that possible for us to reach a conclusion that adding `X-Upstream-Status` back to the response header for all cases, under the control of a switch. Thanks.


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