为什么负载均衡器出现502错误,而不是5XX错误?

huangapple go评论59阅读模式
英文:

Why do I get 502 errors in a load balancer, but not 5XXs?

问题

我的负载均衡器显示502错误,但没有5XX错误。

英文:

My Load balancer shows 502 errors, but not 5XXs errors.

为什么负载均衡器出现502错误,而不是5XX错误?

答案1

得分: 1

根据屏幕截图,这是一个应用负载均衡器(而不是经典或网络负载均衡器)。

这是有关ALB指标的文档链接:https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-cloudwatch-metrics.html

标题为HTTP 5XXs的图表显示了HTTPCode_Target_5XX_Count指标,这是由目标生成的HTTP响应代码的数量,不包括负载均衡器生成的任何响应代码。

标题为HTTP 502s的图表显示了HTTPCode_ELB_502_Count指标,这是由负载均衡器生成的HTTP 502错误代码的数量

因此,问题出在负载均衡器本身。请参考此处以获取可能的原因。

英文:

Based on the screenshot, this is an application load balancer (and not a classic or network load balancer).

Here are the docs for ALB metrics: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-cloudwatch-metrics.html

Graph titled HTTP 5XXs is showing the HTTPCode_Target_5XX_Count metric. Which is the number of HTTP response codes generated by the targets. This does not include any response codes generated by the load balancer.

Graph titled HTTP 502s is showing the HTTPCode_ELB_502_Count metric. Which is the number of HTTP 502 error codes that originate from the load balancer.

So the issue is with the load balancer itself. See here for possible causes.

huangapple
  • 本文由 发表于 2023年2月10日 02:28:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75402938.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定