

Introducing Sidekiq 7.0
source link: https://www.mikeperham.com/2022/10/27/introducing-sidekiq-7.0/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Introducing Sidekiq 7.0
2022-10-27
I’m proud to announce, after nearly a year of work, Sidekiq 7.0 is now available. Sidekiq is the most popular background job system for Ruby, used by thousands of companies around the world. This release is our biggest, most splendiforous release ever!
What’s New?
Metrics
One thing I know: everybody loves big beautiful graphs! Sidekiq 7.0 has a major new feature for tracking and visualizing job execution times. Big thanks to @adamlogic of Rails Autoscale for implementing the new graphs and I hope you’ll agree he did a fantastic job.

The Metrics system is covered in more detail in its own blog post.
But wait, that’s not all! Adam also reimplemented the Dashboard graphs using Chart.js to replace Rickshaw/D3.js and bring the Web UI javascripts into the 2020s. Truly he is a Sidekiq rockstar!
Embedding
Sidekiq can now be embedded within another process in order to share memory and simplify deployments. Instead of needing a 500MB Sidekiq process and a 500MB Puma process, now you might have a 600MB Puma process with Sidekiq running inside. There are some caveats and footguns here so this is definitely more of an advanced feature. Caveat developer!
Embedding is covered in more detail in its own blog post.
Refactoring and New APIs
Lots of internal Sidekiq APIs have been refactored or changed in some way to support these new features. If you maintain a Sidekiq plugin, you really really should test it against Sidekiq 7.0.
Middleware should now include Sidekiq::ClientMiddleware
or Sidekiq::ServerMiddleware
.
Sidekiq 6.5 has these modules also so you may choose to only support Sidekiq 6.5+ in future releases of your middleware. Once you include the module, your middleware should call redis
or logger
instead of Sidekiq.redis
or Sidekiq.logger
.
Requirements
Strict argument checking is now enabled by default. Sidekiq will raise an error if you pass a Symbol or generic Ruby object into perform_async
because they do not serialize correctly into JSON.
This has long been a source of frustration and debugging time for users, better to be upfront about this design decision. From the beginning, Sidekiq has used plain JSON as its job format, for interoperability with all programming languages and environments.
Sidekiq 7.0 now requires Redis 6.2+. That’s a huge jump from 4.0 to 6.2 but Redis Labs has made a lot of changes to Redis commands recently and v6.2 is really necessary to start using the new commands. In 7.1, I’ll update Sidekiq to use those new commands.
I also worked with @_byroot to migrate Sidekiq to the redis-client
gem which uses the new RESP3 protocol found in Redis 6.0+.
The newer protocol provides precise data types for responses, meaning the Ruby client code is greatly simplified.
There are a few compatibility issues between the old and new client; test carefully if you use Sidekiq.redis
in your code.
Sidekiq 7.0 requires Ruby 2.7+. Sidekiq 7.0 supports Rails 6.0+. Both are several years old so this should not be controversial.
Deprecations and Removals
Sidekiq 7.0 removes the Delayed extensions and support for redis-namespace. Neither have been recommended for years now.
With the release of Sidekiq 7.0, Sidekiq 5.x is no longer supported.
Recommend
-
48
The default interface of sidekiq allows you to see the number of processed and failed jobs with a morgue which has all the dead jobs. The interface is sufficient when you...
-
8
Spring Cleaning: Replacing Resque with Sidekiq May 3, 2016 by Titas Norkūnas At Vinted, we have Guilds. No, not the World of Warcraft type - if this was based on...
-
9
you’re gonna need a bigger redisPublished July 11, 2016 #howto
-
6
This is a long one. If you need the quick answer on how to solve Apartment-Sidekiq errors then scroll down to the section titled Correctly Implementing Sidekiq with Apartment. Thanks This blog post is dedic...
-
9
When Sidekiq Makes You Nuts Check Your Types Mar 8, 2017 Much of what I do at the job I'm in the process of leaving is large scale data processing and it is all done through queues and
-
13
Troubleshooting Rails and Sidekiq Feb 17, 2017 I recently had a problem with Rails and Sidekiq that confused the heck out of me for an embarrassingly long time so I thought I'...
-
9
Processing Large Datasets On AWS Using Ruby, Rails and SideKiq Jan 3, 2017 Two days ago I did a data processing task which previously took me a week – overnight. I did this using the following technology stack:
-
7
More Ansible on AWS for Sidekiq Dec 3, 2016 So, much like the Godfather, just when I think I'm out, Ansible pulls me back in… Yesterday I tackled using Ansible to manage Sidekiq. Today I'm going to bring you:
-
10
Killing Sidekiq on AWS with Ansible Dec 2, 2016 We do a lot of batch data processing here and much of that involves shoving crap into Sidekiq to be run in a threaded fashion. I'm not d...
-
10
Sidekiq - Graceful Versus Forceful Oct 13, 2016 So now that I'm using Sidekiq for background processes, I need to be able to start it up, shut it down and I need to understand the difference between forceful a...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK