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

Scale like a pro

Python Porto
December 14, 2017

Scale like a pro

Distributed task processing with Python and Celery

Python Porto

December 14, 2017
Tweet

More Decks by Python Porto

Other Decks in Programming

Transcript

  1. Scale like a pro Distributed computing with message queues and

    Python Roman Imankulov | Python Porto | December 2017
  2. browser ./webserver.py request POST /obj/<id> obj.update() update search indexes update

    business analytics send email “object updated” … response
  3. browser ./webserver.py request POST /obj/<id> response obj.update() ./worker.py ./worker.py ./worker.py

    update search indexes send email “object updated” update business analytics
  4. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks
  5. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results
  6. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results
  7. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies
  8. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution
  9. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution • Rate limits (N tasks per minute)
  10. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution • Rate limits (N tasks per minute) • Autoscaling
  11. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution • Rate limits (N tasks per minute) • Autoscaling • Multiple queues
  12. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution • Rate limits (N tasks per minute) • Autoscaling • Multiple queues • Introspection and statistics
  13. • Different backends • Different serializers • Callbacks / errbacks

    • Progress reports from tasks • Delayed tasks • Ignored results • Expiring results • Retry policies • Time limits on task execution • Rate limits (N tasks per minute) • Autoscaling • Multiple queues • Introspection and statistics • Periodic tasks and crontabs