
HTTP Code 502 Bad Gateway Explained (All its Possible Causes on the Backend)
About this episode
502 Bad Gateway is one of the most infamous errors on the backend, it usually means “hey something wrong with your backend server” but it doesn’t really give enough information.
In this video,
I’ll go through details on why proxies and gateways like NGINX and HAProxy should consider throwing more fine detailed HTTP error codes. 502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server.
0:00 intro
3:45 What Causes a 502 Bad Gateway?
8:00 Cloudflare HTTP error codes
13:00 Security Implications
Support my work on PayPal
Become a Member on YouTube
https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join
🧑🏫 Courses I Teach
https://husseinnasser.com/courses
Get every episode summarized
Each time The Backend Engineering Show with Hussein Nasser publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.
Email me new episodesFree for 3 shows. No card needed.
Hosts & guests
No transcript yet
This episode has not been transcribed. Request it and it moves to the front of the queue.
More episodes
More from The Backend Engineering Show with Hussein Nasser

Caching is a cop-out
The Backend Engineering Show with Hussein Nasser

How open ai agents "hacked" hugging face
The Backend Engineering Show with Hussein Nasser

How a query optimization gave birth to infinite scroll
The Backend Engineering Show with Hussein Nasser

Postgres is half as fast in Linux 7.0
The Backend Engineering Show with Hussein Nasser