英文:
Why do I get 502 errors in a load balancer, but not 5XXs?
问题
我的负载均衡器显示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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论