Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Django tasty salad- DOs and DON'Ts using Celery

Django tasty salad- DOs and DON'Ts using Celery

Best practices and optimizations when using Celery for background tasks.

Roberto Rosario

April 16, 2016
Tweet

More Decks by Roberto Rosario

Other Decks in Programming

Transcript

  1. Celery is a simple, flexible and reliable distributed system to

    process vast amounts of messages, while providing operations with the tools required to maintain such a system. It’s a task queue with focus on real-time processing, while also supporting task scheduling.
  2. • For tasks outside the HTTP request/response cycle. • Long

    running process after an HTTP request. • Distribute a task to better use hardware. • Automatic (scheduled) tasks.
  3. Message broker is an intermediary program module that translates a

    message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver. Message brokers are elements in telecommunication networks where software applications communicate by exchanging formally-defined messages. Message brokers are a building block of Message oriented middleware. https://en.wikipedia.org/wiki/Message_broker
  4. Hint #2: You can implement the rate limit on your

    task code only for what you need.
  5. “RabbitMQ was created specifically for queueing, whereas Redis is an

    in-memory datastore: They were designed with different intents in mind. On my end, I am impressed that Redis even comes close in terms of performance.” - Björn Lindfors