I am configuring my nginx, and I have found two modules: ngx_http_limit_conn_module and ngx_http_limit_req_module one is for limiting connection per defined key, and one for limiting request.

My question is, what is the relationship (and difference) between a http connection and a request? It seems that multi request and use one common http connection, what's the principle under this?


See HTTP Persistent Connections:

HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. The newer HTTP/2 protocol uses the same idea and takes it further to allow multiple concurrent requests/responses to be multiplexed over a single connection.

| improve this answer | |
  • So I made a mistake in my question, it is tcp connection, rather than http connection. – FingerLiu Dec 2 '15 at 8:18
  • Thanks a lot. As connection can be kept alive. I am wondering when while the established connection destroy? I am guessing is there a setting in nginx or linux like max_establish_connection or sth like that, and when established connection count is beyond that some connections are destroyed? Or, there is just a simple setting like connection_survival_time? Which is corret? – FingerLiu Dec 3 '15 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.