Book cover inside an e-reader
Book cover inside an e-reader

Ruby on Rails Background Jobs with Sidekiq

Run Code Later without Complicating Your App

an EBook by David Bryant Copeland

  • 🤔 Are users waiting on services like payment processing?

    🙋‍♂️ Learn to put code in a background job to better manage your infrastructure.

  • 😩 Getting alerted about failing jobs, but don't know what to do?

    🙋 Configure Sidekiq and your jobs to notify you only when you need to know.

  • 💸 Are you double-charging your customers when there's a network outage?

    🙋‍♀️ Re-design your code so that jobs can be safely retried by picking up where they left off…without bothering you.

  • 😵‍💫 Redis, worker processes, failing jobs…not sure how to monitor all this?

    🙋 Learn which metrics are critical—and which aren't—about your Sidekiq installation.

Using a background job system like Sidekiq requires more than just throwing code into a perform method. It means you have a distributed system…and all the complexity that goes with it.

This book has 70 pages packed with pratical, actionable advice, based on my experience managing large background job systems. You'll jump right into getting Sidekiq set up, then putting code into an example app that exhibits all the failures you'll find in the real world.

  1. Create a foundational Sidekiq configuration suitable for production. 🏛️
  2. See jobs fail, then learn how to keep them from notifying you…but without just forgetting about them. 🚨
  3. Watch jobs get retried and wreak havoc inside your app, then fix them by applying a step-by-step process to understand idempotency—the degree to which your code will only have its effects felt once. 🔄
  4. Learn how to organize job code, monitor the right things, and set yourself up to sustainably operate Sidekiq. 📊

About the Author

headshot of David Copeland David Bryant Copeland (“Dave” in real life and @davetron5000 on social media) is a seasoned technical leader with deep experience designing and maintaining distributed systems for Stitch Fix, LivingSocial, OPower, and Mood Health. He’s been a CTO, a Chief Software Architect, a coder, and manager.

He’s the author of “Sustainable Web Development with Ruby on Rails”, “Agile Web Development with Rails 6”, “The Senior Software Engineer”, S.O.L.I.D is not Solid, and “Build Awesome Command-Line Applications in Ruby 2”.

Resources

Related Articles

Colophon

This website was built by hand using HTML and MelangeCSS (with customized purple and blue tints). Text is set in Superclarendon, with fallbacks to Bookman Old Style, URW Bookman, Georgia Pro, Georgia, or the system's serif font. This font stack was provided by Modern Font Stacks. Code is set in Courier, with a fallback to the system monospace font. This website is hosted on AWS using S3 and Cloudfront.

This website should respect your color scheme preferences and adjust to dark or light mode appropriately.