Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the consequences of disabling gossip, mingle and heartbeat for celery workers?

Tags:

What are the implications of disabling gossip, mingle, and heartbeat on my celery workers?

In order to reduce the number of messages sent to CloudAMQP to stay within the free plan, I decided to follow these recommendations. I therefore used the options --without-gossip --without-mingle --without-heartbeat. Since then, I have been using these options by default for all my celery projects but I am not sure if there are any side-effects I am not aware of.

Please note:

  • we now moved to a Redis broker and do not have that much limitations on the number of messages sent to the broker
  • we have several instances running multiple celery workers with multiple queues
like image 587
nbeuchat Avatar asked Mar 19 '19 20:03

nbeuchat


People also ask

What are the effects of gossiping?

Gossip Spreads Lies Very often gossip spreads lies. By gossiping about something and spreading the rumor along, you’re perpetuating those lies. Eventually it leads to many of the hurtful effects listed above. If you’ve ever been lied about and then watched the ensuing gossip spread like wildfire, you know how terrible it feels.

Is it possible to walk away from juicy gossip?

It takes much maturity to walk away from juicy gossip. This can become even harder if you aren’t a fan of the person being talked about. Yet, God requires us to do so. He knows that gossip moves fast and can be a virus to your community. Our focus should be on our own situations and building up others.

Is gossip breaking the Code of silence?

A key element of friendship is confidentiality. When one friend shares with another, they do so in expectation that the friend is a “safe place.” Close friends may disclose details about their intimate lives, children, secret insecurities, past mistakes and expect that no one will ever find out. Yet, gossip breaks this code of silence.


1 Answers

This is the base documentation which doesn't give us much info

heartbeat

Is related to communication between the worker and the broker (in your case the broker is CloudAMQP). See explanation

With the --without-heartbeat the worker won't send heartbeat events

mingle

It only asks for "logical clocks" and "revoked tasks" from other workers on startup.

Taken from whatsnew-3.1

The worker will now attempt to synchronize with other workers in the same cluster.

Synchronized data currently includes revoked tasks and logical clock.

This only happens at startup and causes a one second startup delay to collect broadcast responses from other workers.

You can disable this bootstep using the --without-mingle argument.

Also see docs

gossip

Workers send events to all other workers and this is currently used for "clock synchronization", but it's also possible to write your own handlers on events, such as on_node_join, See docs

Taken from whatsnew-3.1

Workers are now passively subscribing to worker related events like heartbeats.

This means that a worker knows what other workers are doing and can detect if they go offline. Currently this is only used for clock synchronization, but there are many possibilities for future additions and you can write extensions that take advantage of this already.

Some ideas include consensus protocols, reroute task to best worker (based on resource usage or data locality) or restarting workers when they crash.

We believe that although this is a small addition, it opens amazing possibilities.

You can disable this bootstep using the --without-gossip argument.

like image 62
ofirule Avatar answered Oct 09 '22 11:10

ofirule