What is the difference between 4xx and 5xx errors, and which ones do you see most in networking problems?
BeginnerScenarioTLS, HTTP & Application Layer
Answer
Situation read → Client versus server errors, and which of them point at infrastructure.
What I'd do →
- 4xx means the request is the problem: 400 bad request, 401 and 403 auth, 404 not found, 429 rate limited
- 5xx means the server or path failed: 500 app error, 502 bad gateway (invalid response from upstream), 503 unavailable (no healthy targets or overload), 504 gateway timeout (upstream too slow)
- From the proxy log compare
upstream_statusandstatus - Test the backend directly with
curl -v http://10.0.1.10:8080/health
Why → 502, 503 and 504 almost always mean the proxy or load balancer cannot get a good answer from its backend.
Interview tip → Say you map 502 to bad response, 503 to no capacity and 504 to slow response.
More on TLS, HTTP & Application Layer
Explain what happens in a TLS 1.3 handshake in a few sentences.BeginnerYour site must redirect all HTTP traffic to HTTPS. How do you do it?BeginnerHTTP/1.1, HTTP/2 and HTTP/3: what changed and why does it matter in operations?BeginnerThe browser console shows a CORS error when your frontend calls your API. What is it and how do you fix it?BeginnerHow do you check which certificate a server presents and when it expires?BeginnerWhat is the difference between HTTP keep-alive and a new TCP connection per request?Beginner