Comments (7)
Hey Darren -
I use a mix of both approaches in my application and have not run into any issues. The only potential problem you could run into is if your job size is too large. By default, beanstalkd uses a max job size of 65535 bytes but this can be configured with the -z command line option. I guess network I/O could also be an issue if you process a ton of jobs from a single beanstalkd instance but that seems unlikely. The string encodings should not be an issue.
Best,
Ryan
from backburner.
Hi, thanks for your response.
I'd already gone ahead and made the change - after lots of testing. :-)
It's working great - I've managed to double my throughput with this approach as it's much quicker.
The only issue I have is if I need to pass more info to the job queue - it involves changing the method signature which in turn means draining the queue of all messages to ensure no jobs still exist expecting the old method signature. This of course isn't a problem if you use database ids.
from backburner.
You could use a versioned tube name approach to achieve a "zero down-time" style migration when you need to change the method signature. If you are reading/writing to tube-name-v1
and need to make a switch, just start writing to tube-name-v2
as part of your change and read from both v1 and v2. Then just stop reading from v1 in a later deploy once it has cleared.
from backburner.
You could use a versioned tube name approach to achieve a "zero down-time"
👍 I second that, I often use versioned tube names for this purpose.
from backburner.
That's a pretty cool idea - thanks for that.
Not sure I fully understand though - if I deploy new code won't jobs in tube-name-v1
still fail when they call the perform method with the wrong number of parameters?
from backburner.
When using job classes that respond to perform, you will have to create a new class (or subclass) for the new job definition which uses the new tube and change your code to enqueue jobs of the new type.
from backburner.
Right, I get it now.
Thanks.
from backburner.
Related Issues (20)
- undefined method `tubes' for Backburner::Connection
- Queue settings aren't inherited from superclass
- Support retrying jobs without logging an exception HOT 1
- Job remains reserved when before_perform hook returns false
- Incompatible with foreman? HOT 2
- Possible to process jobs not enqueued with Backburner? HOT 1
- Travis builds failing HOT 4
- concurrent-ruby restrictive dependency HOT 2
- New release? HOT 1
- Datadog monitoring hooks
- Implement unix socket url
- ActiveJob based of backburner is restarting the job within HOT 2
- Difference with BeanEater HOT 1
- ThreadsOnFork not taking any job with a thread_number of 1 HOT 2
- Upgrading Beaneater to 1.1 makes job queues fail HOT 3
- Hook documentation is misleading about the ability to bury a job HOT 1
- NoMethodError (undefined method `queue_max_job_retries' for TestJob:Class) HOT 3
- Alternative ways to make workers work HOT 1
- Exception NoMethodError -> undefined method `ttr' for nil:NilClass HOT 1
- Replacing File.exists? with File.exist? as the former has been removed from ruby 2.7.7 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backburner.