“Bad Gateway”常指 HTTP 502 错误:服务器作为网关/代理(gateway/proxy)时,从上游服务器收到了无效响应,因此无法把正确结果返回给客户端。多见于网站访问、反向代理(如 Nginx)、CDN、API 网关等场景。(字面上也可理解为“糟糕的网关/入口”,但最常见用法是网络错误提示。)
/ˌbæd ˈɡeɪt.weɪ/
The site shows “Bad Gateway” when I refresh the page.
我刷新页面时网站显示“Bad Gateway”。
After we deployed the update, the reverse proxy started returning a 502 Bad Gateway because the upstream service was timing out.
我们部署更新后,反向代理开始返回 502 Bad Gateway,因为上游服务请求超时了。
“Gateway”由 gate(门)+ way(路) 组成,本义是“通道/入口”。在网络语境里,gateway 指在不同网络或服务之间转发请求的“网关/代理”。“Bad Gateway”作为 HTTP 状态码 502 的原因短语(reason phrase),用来描述网关从上游获取到“坏的/无效的”响应这一类问题。