hard20 pts · first answer countspostgresqlconcurrencymessage-queues
Workers block each other on a jobs table
Ten workers each run SELECT ... FROM jobs WHERE status = 'pending' ORDER BY id LIMIT 1 FOR UPDATE. They end up waiting on the same row and process jobs one at a time. What fixes this?
Discussion 0
Join free to post in the discussion.
Related questions
- Slow email during signupBackend Developer
- Duplicate emails despite a checkBackend Developer
- Updating a counter in MongoDBBackend Developer
- Counting API calls in RedisBackend Developer
- Queue versus topicBackend Developer
- Why put a queue between servicesBackend Developer
- What a RabbitMQ exchange doesBackend Developer
- Direct exchange routingBackend Developer