Git Product home page Git Product logo

Comments (4)

nochte avatar nochte commented on May 23, 2024

Could instead have the worker hit an API endpoint for that config.

from worker.

naorlivne avatar naorlivne commented on May 23, 2024

There are 2 reasons I think using RabbitMQ will be preferable over polling the API:

  • Polling the API requires having it accessible to all workers in addition to RabbitMQ, this adds complexity to setting up workers & security wise increases the possible attack surface (as the entire architecture of Nebula revolves around RabbitMQ removing that instead would be near impossible)
  • Polling the API adds a risk of a "roaring horde" problem if\when a lot of workers attempt to do the initial sync at the same time, the current workaround of having a random delay before syncing will solve that with the API but as RabbitMQ can simply queue massages & reply to them in order it removes the need of that random delay which should help speed up the initial sync.

That been said I'm a strong believer in letting the end user choose how to configure his\hers tools and adding an optional envvar\config-setting which allows the workers to query via the API rather then through RabbitMQ won't be that much of work (in fact there is already an API endpoint which returns the config of an app) so why not have both?

@nochte feel like raising a ticket request about it?

from worker.

naorlivne avatar naorlivne commented on May 23, 2024

Attached is the planned worker "bootstraping" workflow for resolving this ticket via RabbitMQ direct reply RPC calls, after a lot of thoughts and discussions with multiple knowledgeable people this feels to me like the best course of action as it both allows the flexibility of AMQP will still remaining simple to implement in a scalable fashion.

nebula_rabbitmq_direct_reply_worker_startup_sync

from worker.

naorlivne avatar naorlivne commented on May 23, 2024

Pushed to latest\master, will be added to next numbered release (which due to the major architectural change will be a Major release to v2.0.0).

from worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.