HTTP Proxy Error Status Codes

The application is a Node.js web crawler that executes requests to remote servers through the request library.

Requests are made through authenticated HTTP proxies with 99% and higher uptime provided by a third-party provider.

I am trying to process HTTP codes to request request errors that could be caused by an incorrect proxy. He expected that after reaching the threshold of these HTTP codes, a flag will be triggered that the proxy server will be unreliable, so the proxy server will be queued for diagnostics. And I expect some codes to have more weight.

I am currently processing 407 (proxy authentication) and 408 (request timeout) HTTP codes for proxies.

Are there other HTTP codes that are usually caused by HTTP proxy failures?

I hope this question is specific enough. I assume that the possible malfunction (and the set of possible HTTP error status codes) depends on the actual proxy server and its environment. We should consider these proxies as black because they are provided by a third party.

The issue is not HTTP status codes at all, only error codes can be caused by proxy failures (forward proxies).

+5
source share
2 answers

According to HAProxy docs (one of the most popular proxy solutions)

Haproxy can independently allocate the following status codes :

  • 200 access to the statistics page and when responding to monitoring requests
  • 301 when performing redirection, depending on the configured code
  • 302 when redirecting, depending on the code configured
  • 303 when performing redirection, depending on the configured code
  • 307 when redirecting, depending on the code configured
  • 308 when performing redirection, depending on the configured code
  • 400 for invalid or too large request
  • 401, when authentication is required to complete an action (when accessing the statistics page)
  • 403, when the request is denied by the ACL block or the "reqdeny" block - 408, when the request timeout is struck before the request is completed
  • 500 when haproxy detects an unrecoverable internal error, such as a memory failure that should never occur
  • 502 when the server returns an empty, invalid, or incomplete response, or when the rspdeny filter blocks the response.
  • 503, when the server was not available to process the request or in response to monitoring requests that correspond to a โ€œmonitor failureโ€, the condition
  • 504 when the response time is answered before the server responds
+3
source

"Caused by the proxy server" I would understand everything, including the word "gateway" in his name, basically.

The trick here is non-standard HTTP error codes implemented / specially developed by providers.

0
source

Source: https://habr.com/ru/post/1276067/


All Articles