heroku-buildpack-jemalloc
sidekiq-unique-jobs
Our great sponsors
heroku-buildpack-jemalloc | sidekiq-unique-jobs | |
---|---|---|
3 | 4 | |
238 | 1,415 | |
- | - | |
2.5 | 8.1 | |
6 months ago | 24 days ago | |
Shell | Ruby | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
heroku-buildpack-jemalloc
-
Delayed Job vs. Sidekiq: Which Is Better?
Using jemalloc instead of regular malloc helps too. The exact way to do this depends on the platform you use, but it is pretty simple on Heroku. Just set heroku-buildpack-jemalloc as the first buildpack (ahead of the heroku/ruby buildpack).
I've recently discovered jemalloc, specifically when used with Heroku.
"Using jemalloc instead of regular malloc helps too. The exact way to do this depends on the platform you use, but it is pretty simple on Heroku. Just set heroku-buildpack-jemalloc as the first buildpack (ahead of the heroku/ruby buildpack)."
FYI, remember to set JEMALLOC_ENABLED=true in your env to actually turn it on.
https://github.com/gaffneyc/heroku-buildpack-jemalloc
-
Digital Ocean App Platform vs Heroku
Like I mentioned earlier, Digital Ocean App Platform uses the same buildpacks as Heroku to deploy your apps. This means that most apps that can be deployed on Heroku should also be deployed on Digital Ocean. There is one big caveat, though; you can't select which buildpack(s) to use. This means you have to rely on Digital Ocean to pick the right ones for your project. It also gives you a bit less flexibility in how your app runs. For instance, I recently configured our app at work to run using jemalloc, a malloc alternative that often has better performance for Ruby apps. We did that via a buildpack heroku-buildpack-jemalloc, which allowed us to switch to jemalloc without any app changes. Customizations to the build environment like this don't seem possible given the Digital Ocean App Platform's current offerings.
sidekiq-unique-jobs
-
How to Avoid Race Conditions in Rails
If you use Sidekiq workers to make changes to your database, you can use SidekiqUniqueJobs to add unique constraints to Sidekiq queues. Uniqueness is achieved by acquiring locks for a hash of a queue name, a worker class, and a job's arguments. By default, only one lock for a given hash can be acquired. If an attempt to acquire a new lock is made, an exception SidekiqUniqueJobs::ScriptError is raised.
- Sidekiq - enqueue a job after a series of other jobs are finished
-
Delayed Job vs. Sidekiq: Which Is Better?
https://github.com/mhenrixon/sidekiq-unique-jobs
All of which also extend the web UI for Sidekiq which is incredibly useful for both debugging and having a handle on what's with your queues.
Finally, if you're going to be using Sidekiq in any serious way I'd recommend Nate Berkopec's "Sidekiq in Practice" - https://nateberk.gumroad.com/l/sidekiqinpractice
Beyond being an incredibly useful resource on its own - you get access to a very active private Slack that is filled with other very helpful developers who are using Sidekiq.
-
Getting Sidekiq to play nicely with auto-scaling
That's an interesting suggestion. We're relying on ActiveJob and sidekiq-unique-jobs doesn't explicitly support it, unfortunately. We'll have to test it out, though, and see if it just happens to work.
What are some alternatives?
Delayed::Job - Database based asynchronous priority queue system -- Extracted from Shopify
sidekiq-throttled - Concurrency and rate-limit throttling for Sidekiq
subdir-heroku-buildpack - Allows to use subdirectory configured via environment variable as a project root
job-iteration - Makes your background jobs interruptible and resumable by design.
create-react-app-buildpack - ⚛️ Heroku Buildpack for create-react-app: static hosting for React.js web apps
Sidekiq-Cron - Scheduler / Cron for Sidekiq jobs
inst-jobs - Instructure-maintained fork of delayed_job
with_advisory_lock - Advisory locking for ActiveRecord
heroku-integrated-firefox-geckodriver - Buildpack enables your client code to access Firefox along with Geckodriver in a Heroku slug.
good_job - Multithreaded, Postgres-based, Active Job backend for Ruby on Rails.
dotnetcore-buildpack - Heroku .NET Core Buildpack
sidekiq - Sidekiq worker on Render