title: Race condition in multiple Unicorn instances (Rails)
body: <p>Let's say I have a controller action that takes a lot of time to perform, and does several Database operations in between, and they somehow only work well if the whole action is atomic.</p>
  
  <p>If I have several instances of the application distributed in several servers, with a Nginx balance loader, in other words, if two requests hit at the same time, they would begin to process at the same time by two different servers. </p>
  
  <p>What's the way to avoid problems with race condition in this case? It looks like something any distributed application would suffer from.</p>