Question: How does dogpile behave in multi-process environments?

Issue #16 resolved
Ralph Bean
created an issue

I'm trying out dogpile for an app and it's working wonderfully so far; thanks for this!

I'm curious how it will behave in a multi-process WSGI environment. We have two app servers for this app, each running mod_wsgi with 8 processes for each. If we use a memcached backend shared by the two nodes, do you expect that requests will block appropriately between the two different instances?

Comments (3)

  1. Michael Bayer repo owner

    hi ralph, been having email probs so missed this somehow.

    when you have multiple processes which you want to coordinate on value generation, you need to have the system lock on some resource that's external to the process. In the case of memcached, we offer a memcached "lock" that does the atomic add thing (see Other options include locking on a lockfile, or some other service like a redis server or such.

    the "distributed client" lock isn't turned on by default, the memcached backends will use the memcached lock if you set distrbuted_lock to true:

  2. Log in to comment