Upstream / downstream terminology used backwards? (E.g. nginx)

In HTTP world, the “upstream server” term was introduced in the HTTP/1.0 specification, RFC 1945:

502 Bad Gateway

The server, while acting as a gateway or proxy, received an invalid
response from the upstream server it accessed in attempting to
fulfill the request.

Formal definition was added later, in RFC 2616:

upstream/downstream

Upstream and downstream describe the flow of a message: all
messages flow from upstream to downstream.

According to this definition:

  • if you are looking at a request, then the client is upstream, and the server is downstream;
  • in contrast, if you are looking at a response, then the client is downstream, and the server is upstream.

At the same time, in HTTP most of the data flow is not for requests, but for responses. So, if you’ll consider flow of responses, then the “upstream server” term sounds pretty reasonable and logical. And the term is again used in the 502 response code description (it is identical to HTTP/1.0 one), as well as some other places.

The same logic can be also seen in terms “downloading” and “uploading” in natural language. Most of the data flow is from servers to clients, and that’s why “downloading” means loading something from a server to a client, and “uploading” – from a client to a server.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)