Dogpiling

Hey folks,

Can I use nginx for anti-dogpiling?

We have been using Varnish cause it has antidogpiling options, but its
so limited in terms of what it does as to what we need, that id love to
use nginx.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,69088,69088#msg-69088

Hi, could you explain more about dogpiling? i don’t understand and
haven’t found any term related to web except for search engine named
‘dogpile’


Regards,
Kiswono P
GB

He’s referring to a cache stampede, when an item in the proxy cache
expires and multiple threads simultaneously try to repopulate it causing
load spikes and possible locking conditions.

nginx changes status of expired cache items to “UPDATING” for the period
of
time when it fetches new copies. Combine this with
“proxy_cache_use_stale
updating” and “dogpiling” shouldn’t be a problem.

Best regards,
Piotr S. < [email protected] >

He’s referring to a cache stampede, when an item in the proxy cache
expires and multiple threads simultaneously try to repopulate it causing
load spikes and possible locking conditions. The item below from
memcache’s faq has a few suggestions of how to avoid this for memcached.

http://code.google.com/p/memcached/wiki/FAQ#How_to_prevent_clobbering_updates,_stampeding_requests

After a quick look I didn’t see any options to avoid stampede’s in
nginx’s proxy caching nor in the memcached module. Does nginx have this
built in? Or when a item in the proxy cache expires, is there a rush of
requests to the back-end to refresh it?

A useful method (if it isn’t already built in) might be to block threads
that have requested the resource being refreshed until the thread doing
the refreshing completes. A configurable timeout might be helpful.

Mark.

Hello!

On Tue, Mar 30, 2010 at 02:06:51AM -0700, Mark M. wrote:

I tried to update the documentation to add an explanation of the
‘updating’ parameter of proxy_cache_use_stale but it appears to have
broken the entire documentation page on the proxy module after I
saved my changes to the wiki. It’s now blank:

http://wiki.nginx.org/NginxHttpProxyModule

When I hit save the wiki server sent me an index.php file that my
browser wanted to save to disk (incorrect mime type set). I tried
several times to re-save or cancel my edit but same result.

Cliff, could you please take a look what’s going wrong? Wiki just
closes connection on some pages (including the mentioned one).

Maxim D.

On Tue, 2010-03-30 at 14:43 +0400, Maxim D. wrote:

When I hit save the wiki server sent me an index.php file that my
browser wanted to save to disk (incorrect mime type set). I tried
several times to re-save or cancel my edit but same result.

Cliff, could you please take a look what’s going wrong? Wiki just
closes connection on some pages (including the mentioned one).

It should be fixed now. The VE was running out of tcp sockets.

Regards,
Cliff

Maxim D.

http://www.google.com/search?q=vonage+sucks

I tried to update the documentation to add an explanation of the
‘updating’ parameter of proxy_cache_use_stale but it appears to have
broken the entire documentation page on the proxy module after I saved
my changes to the wiki. It’s now blank:

http://wiki.nginx.org/NginxHttpProxyModule

When I hit save the wiki server sent me an index.php file that my
browser wanted to save to disk (incorrect mime type set). I tried
several times to re-save or cancel my edit but same result.

Mark.

On Tue, 2010-03-30 at 14:43 +0400, Maxim D. wrote:

When I hit save the wiki server sent me an index.php file that my
browser wanted to save to disk (incorrect mime type set). I tried
several times to re-save or cancel my edit but same result.

Cliff, could you please take a look what’s going wrong? Wiki just
closes connection on some pages (including the mentioned one).

Hm, I stand corrected, there’s still an issue. I’ll report back when
it’s resolved.

Cliff

Maxim D.

http://www.google.com/search?q=vonage+sucks

Okay, it is fixed.

Cliff

On Tue, 2010-03-30 at 14:43 +0400, Maxim D. wrote:

When I hit save the wiki server sent me an index.php file that my
browser wanted to save to disk (incorrect mime type set). I tried
several times to re-save or cancel my edit but same result.

Cliff, could you please take a look what’s going wrong? Wiki just
closes connection on some pages (including the mentioned one).

Maxim D.

http://www.google.com/search?q=vonage+sucks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs