Laravel Queue, Beanstalkd vs Database, what are the differences?

Nicekiwi

Is there much difference between using Beanstalkd and a database driver for queues?

What would some pros and cons be? The database queue seems to easier to setup and run, what should I know about using it?

Theres no real explanations in the docs about it.

Arpit

Using a database as a queue can be simpler to setup and probably easier to test on a development machine. But running a database as a queue in production may not be a very good idea; especially in a high traffic scenario. Although a database may not be the right tool for queueing, let's look at the pros & cons of using it as such.

Pros:

  • Easier to setup
  • May reduce the number of moving parts in your application if you use the same database

Cons:

  • For lot's of reads and writes, there has to be some mechanism for locking rows and updating the indexes etc.
  • Polling workers would also lock up an index in order to do work on it and update the row with the final status of the job.
  • In such scenarios, the writes to the DB may be queued and would take longer to execute.

Messaging queues such as SQS, Beanstalkd, RabbitMQ etc. are built to handle these scenarios. Since they only care about a message being stored and processed, they don't have to worry about locking and transaction logging (which is required by a database). Adding a messaging queue to your system will help it scale much more easily. Also, it'll let the database breathe by allowing it to do actual transaction processing without worrying about messaging as well.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Laravel Queue is repeating with beanstalkd and redis

From Dev

Laravel Queue is repeating with beanstalkd and redis

From Dev

Supervisord Fatal (Laravel 4.1 + Beanstalkd) No commands defined in the "queue" namespace

From Dev

Beanstalkd + supervisor + laravel : Queue processing with more than 10000 jobs an hour

From Java

@synthesize vs @dynamic, what are the differences?

From Dev

What is the differences between methods in Java Queue interface ?

From Dev

Preserve beanstalkd queue on restart or crash

From Dev

Beanstalkd failover for queues in Laravel

From Dev

laravel 5.1 database queue not working

From Dev

Optical flow vs keypoint matching: what are the differences?

From Dev

getc() vs fgetc() - What are the major differences?

From Dev

What are the main differences between NOT IN vs. <> ALL?

From Dev

What are the differences restkit vs afnetworking vs mknetworkkit vs nsurlconnection

From Dev

Unable to get Beanstalkd Queue to work for PHP

From Dev

Best practice beanstalkd (queue) and node.js

From Dev

Unable to get Beanstalkd Queue to work for PHP

From Dev

Setup Remote beanstalkd Laravel 4.2

From Dev

Why is Laravel or Beanstalkd skipping jobs?

From Dev

Laravel + Beanstalkd - job is processed but not fired?

From Dev

Laravel + Beanstalkd - job is processed but not fired?

From Dev

Laravel: Schedule tasks using Beanstalkd

From Dev

Make Laravel use database Queue instead of sync

From Dev

What's the differences between !$pristine vs $dirty in angularjs

From Dev

What are differences between RGB vs RGBA other than 'opacity'

From Dev

Smart Bluetooth: GATT Vs. ATT - what are the differences between them?

From Java

What are the differences between readonly vs get in TypeScript properties?

From Dev

What are the differences between Python Dictionaries vs Javascript Objects?

From Dev

What are the differences between using Nightwatch.js vs Protractor

From Dev

What are the differences bewteen using ISOs vs extracting distributions in multiboot LiveUSBs?

Related Related

  1. 1

    Laravel Queue is repeating with beanstalkd and redis

  2. 2

    Laravel Queue is repeating with beanstalkd and redis

  3. 3

    Supervisord Fatal (Laravel 4.1 + Beanstalkd) No commands defined in the "queue" namespace

  4. 4

    Beanstalkd + supervisor + laravel : Queue processing with more than 10000 jobs an hour

  5. 5

    @synthesize vs @dynamic, what are the differences?

  6. 6

    What is the differences between methods in Java Queue interface ?

  7. 7

    Preserve beanstalkd queue on restart or crash

  8. 8

    Beanstalkd failover for queues in Laravel

  9. 9

    laravel 5.1 database queue not working

  10. 10

    Optical flow vs keypoint matching: what are the differences?

  11. 11

    getc() vs fgetc() - What are the major differences?

  12. 12

    What are the main differences between NOT IN vs. <> ALL?

  13. 13

    What are the differences restkit vs afnetworking vs mknetworkkit vs nsurlconnection

  14. 14

    Unable to get Beanstalkd Queue to work for PHP

  15. 15

    Best practice beanstalkd (queue) and node.js

  16. 16

    Unable to get Beanstalkd Queue to work for PHP

  17. 17

    Setup Remote beanstalkd Laravel 4.2

  18. 18

    Why is Laravel or Beanstalkd skipping jobs?

  19. 19

    Laravel + Beanstalkd - job is processed but not fired?

  20. 20

    Laravel + Beanstalkd - job is processed but not fired?

  21. 21

    Laravel: Schedule tasks using Beanstalkd

  22. 22

    Make Laravel use database Queue instead of sync

  23. 23

    What's the differences between !$pristine vs $dirty in angularjs

  24. 24

    What are differences between RGB vs RGBA other than 'opacity'

  25. 25

    Smart Bluetooth: GATT Vs. ATT - what are the differences between them?

  26. 26

    What are the differences between readonly vs get in TypeScript properties?

  27. 27

    What are the differences between Python Dictionaries vs Javascript Objects?

  28. 28

    What are the differences between using Nightwatch.js vs Protractor

  29. 29

    What are the differences bewteen using ISOs vs extracting distributions in multiboot LiveUSBs?

HotTag

Archive