#328·node

Support for multiple instances behind load balancer

Author: lautarodraganCreated Aug 14, 2018Updated Apr 4, 2019
Labelsneeds definitioninfrastructure

Running multiple instances of the node behind a load balancer could lead to race conditions.

https://github.com/poetapp/node/blob/b1ffa5e6ec7a0de6951c13794f5421dcd68920c1/src/Storage/ClaimController.ts#L111-L117

To ensure there are no race conditions we need to use findAndModify and ensure the proper indexes are created.

TODO:

  • Find and list all places in code that could lead to race conditions
  • List all indexes we're missing