Hacker News new | ask | show | jobs
by jeffbee 339 days ago
I would say the bullet points at the top are not strictly correct. The response does not necessarily transit the proxy. Responses can be returned directly to the client (DSR).
1 comments

> Note: For simplicity, we’ll focus on Layer 7 (HTTP) reverse proxy.

Layer 4 proxies are a very specific sometimes food that most people should actively avoid until they need it because of the tradeoffs.

DSR is layer 4, and not in scope of this post.

Your comment, to me, only points out that the OSI layer model is nonsense. Envoy in DSR mode routes traffic based on application features, at "layer 7".
That's fair. Of course that post also calls the OSI model "unfortunate" and "a poor approximation".
All models are wrong, some are useful.

Layer 4 to 7 is useful in this case, as layer 4 involves forging tcp/udp packets, which is vastly different than say a http level reverse proxy.

If you actually read ITU T-REC X.200, which specifies the OSI model, you'll find that it doesn't match the modern internet at all. E.g., we don't have an OSI-style transport protocol at all (connections themselves aren't addressable independent of the SSAPs), TCP and UDP are actually layer 5, the presentation layer is protocol-specific, and pretty much the entire stack falls to bits if the network layer isn't packet switched.

There's a separate term for the bits of the OSI model that are actually relevant; it's called the IETF model.

The model itself isn’t nonsense because it’s not a model of load balancers; it’s a model of network protocols. Load balancers might handle multiple levels of the stack for the same traffic, but so does any other networked program, eg handling cross-domain redirects.