Welcome! Log In Create A New Profile

Advanced

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin
July 01, 2014 07:04AM
Hello!

On Mon, Jun 30, 2014 at 11:10:52PM -0400, Paul Schlie wrote:

> Regarding:
>
> > In http, responses are not guaranteed to be the same. Each
> > response can be unique, and you can't assume responses have to be
> > identical even if their URLs match.
>
> Yes, but potentially unique does not imply that upon the first valid ok or valid
> partial response that it will likely be productive to continue to open further such
> channels unless no longer responsive, as doing so will most likely be counter
> productive, only wasting limited resources by establishing redundant channels;
> being seemingly why proxy_cache_lock was introduced, as you initially suggested.

Again: responses are not guaranteed to be the same, and unless
you are using cache (and hence proxy_cache_key and various header
checks to ensure responses are at least interchangeable), the only
thing you can do is to proxy requests one by one.

If you are using cache, then there is proxy_cache_key to identify
a resource requested, and proxy_cache_lock to prevent multiple
parallel requests to populate the same cache node (and
"proxy_cache_use_stale updating" to prevent multiple requests when
updating a cache node).

In theory, cache code can be improved (compared to what we
currently have) to introduce sending of a response being loaded
into a cache to multiple clients. I.e., stop waiting for a cache
lock once we've got the response headers, and stream the response
body being load to all clients waited for it. This should/can
help when loading large files into a cache, when waiting with
proxy_cache_lock for a complete response isn't cheap. In
practice, introducing such a code isn't cheap either, and it's not
about using other names for temporary files.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 24, 2014 02:52PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin June 24, 2014 06:38PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 24, 2014 07:52PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin June 24, 2014 08:32PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 24, 2014 09:00PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 24, 2014 11:00PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 30, 2014 08:46PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 30, 2014 09:16PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin June 30, 2014 09:34PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie June 30, 2014 11:12PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin July 01, 2014 07:04AM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie July 01, 2014 08:46AM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin July 01, 2014 09:22AM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie July 01, 2014 10:18AM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Maxim Dounin July 01, 2014 12:42PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie July 01, 2014 04:14PM

Re: How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie July 01, 2014 05:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready