Skip to content

Conversation

groyoh
Copy link
Contributor

@groyoh groyoh commented Oct 13, 2025

Context

Today, we are using Sidekiq to handle our background jobs. While it works well for most of our needs, we are reaching some limitations with the open-source version, particularly around job reliability during high load.

Sidekiq uses BRPOP to fetch a job from the queue in Redis. This is very efficient and simple but it has one drawback: the job is now removed from Redis. If Sidekiq crashes while processing that job, it is lost forever.

Description

This adds sidekiq-pro as an optional dependency which can be install when building the Docker image.

This also updated the Dockerfile to:

  1. Accept a BUNDLE_WITH which can be used to conditionally enabled Sidekiq Pro when the value is sidekiq-pro.

  2. Mount the BUNDLE_GEMS__CONTRIBSYS__COM variable as a Docker secret as it's only required during the build and is a sensitive information.

  3. Rely on BUNDLE_WITHOUT env variable instead of the --without command line option to be consistent and because it is deprecated:

    [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'test'`, and stop using this flag
    

Note that we also added a LAGO_SIDEKIQ_PRO_REQUIRED env variable which will cause the app to not boot if Sidekiq Pro is not properly installed.

@groyoh groyoh marked this pull request as ready for review October 15, 2025 09:15
@groyoh groyoh requested review from IxDay and jdenquin October 15, 2025 09:15
@julienbourdeau
Copy link
Contributor

Am I correct to understand that oss release will ship without sidekiq pro in the image and you must rebuild the image with your own BUNDLE_GEMS__CONTRIBSYS__COM to use sidekiq pro?

@groyoh
Copy link
Contributor Author

groyoh commented Oct 15, 2025

Am I correct to understand that oss release will ship without sidekiq pro in the image and you must rebuild the image with your own BUNDLE_GEMS__CONTRIBSYS__COM to use sidekiq pro?

Yes.

Copy link
Contributor

@IxDay IxDay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question for you, otherwise it looks good

@groyoh
Copy link
Contributor Author

groyoh commented Oct 17, 2025

Thanks for the review @IxDay 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants