2

In metrics such as "requests per second" and "hits per second" for web servers, are the terms "request" and "hit" synonymous? Can you think of a context in which a request is not a hit?

Rand Dom
  • 31
  • 2
  • Smells like homework – jlehtinen Feb 03 '15 at 20:00
  • maybe I should write questions for schools you mean? I'm just curious -- Most pages I have read say that a hit is a request. – Rand Dom Feb 03 '15 at 20:09
  • Using the word "Hit" to refer to anything from only an initial website visit, each HTML pageload, to every single HTTP request/response was definitely something people did in the late-1990s to early-2000s ("hit counters" for one, and its use in contemporaneous webserver log analytics software) - but I honestly haven't seen technology professionals use the word "hit" like that since the mid-2000s - while TV shows and the like took a few more years, I think the term "hit" w.r.t. HTTP is just dead now. I think because it's just not a useful technical term and was never formally defined either. – Dai Jun 08 '22 at 07:51

2 Answers2

6

I think the terminology around this is not entirely clear. One interpretation:

One website hit might result in multiple (HTTP) requests, e.g. for the HTML, JS, CSS and images, however it's entirely possibly that the statistic you use will combine all this as one request.

When in doubt, read the docs.

Sven
  • 97,248
  • 13
  • 177
  • 225
1

The exact meaning of those terms is context-sensitive. Normally, I'd consider "request" and "hit" to be synonymous.

However, when talking about a caching webserver, a "hit" might refer to a cache hit (as opposed to a "miss"). You might get 10 requests per second, of which 70% are hits (that were able to take advantage of the cache) and the other three requests are misses (that had to be relayed to the upstream server).

200_success
  • 4,701
  • 1
  • 24
  • 42