Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple instances behind load balancer #328

Open
lautarodragan opened this issue Aug 14, 2018 · 8 comments
Open

Support for multiple instances behind load balancer #328

lautarodragan opened this issue Aug 14, 2018 · 8 comments

Comments

@lautarodragan
Copy link
Member

lautarodragan commented Aug 14, 2018

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

const pipe = pipeP(
this.findEntryToDownload,
this.updateEntryAttempts,
this.downloadEntryClaim,
this.updateEntryPairs,
this.publishEntryDownload
)

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
@lautarodragan lautarodragan added this to the Mainnet-beta milestone Aug 14, 2018
@lautarodragan lautarodragan changed the title Use findAndModify to avoid race conditions Support for multiple instances behind load balancer Aug 14, 2018
@geoffturk
Copy link
Contributor

Assigning to @warrenv.

@WesleyCharlesBlake
Copy link
Member

@lautarodragan and @wzalazar : would we need to replicate this across to frost-api as well?

@lautarodragan
Copy link
Member Author

@WesleyCharlesBlake we already have four instances of Frost API behind an LB in production and they have been working fine 😎

Frost API has much less state in general (since it delegates most operations to the node), but it'd be nice to do a thorough check just to be on the safe side.

@WesleyCharlesBlake
Copy link
Member

Awesome! Was just making sure. But yes will need a thorough audit in frost-api . So for in k8s it's been working well.

@geoffturk geoffturk assigned kennylavender and unassigned warrenv Sep 21, 2018
@geoffturk
Copy link
Contributor

Reassigning to @kennylavender. Please sync with Warren if you need any input.

@geoffturk geoffturk assigned warrenv and unassigned kennylavender Oct 9, 2018
@geoffturk
Copy link
Contributor

Moving this back over to you @warrenv to keep Kenny focused on API and work/claim split. Thanks.

@geoffturk
Copy link
Contributor

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

Is this something we can be testing out in the new QA environment right now? (@WesleyCharlesBlake @lautarodragan)

@WesleyCharlesBlake
Copy link
Member

yeah simple enough to test out, just need to increase the replica count for each node configuration from 1 to n (where n is the ideal amount needed to run optimally)

@geoffturk geoffturk added t4 and removed t2 labels Oct 18, 2018
@geoffturk geoffturk modified the milestones: Mainnet-beta, Mainnet-launch Oct 31, 2018
@geoffturk geoffturk added ct-z and removed ct-z labels Nov 29, 2018
@geoffturk geoffturk modified the milestones: Mainnet-launch, PML2 Dec 5, 2018
@lautarodragan lautarodragan removed this from the PML2 milestone Jan 4, 2019
@lautarodragan lautarodragan removed the t4 label Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants