keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
700 stars 40 forks source link

Add Sidekiq Enterprise/Pro #798

Open ezekg opened 4 months ago

ezekg commented 4 months ago

We will need to do this in a way that is opt-out, e.g. via an environment variable NO_SIDEKIQ_ENT and NO_SIDEKIQ_PRO, since the average Keygen CE installation will not pay for Sidekiq Enterprise or Sidekiq Pro.

Right now, the plan would be to replace both sidekiq-cron and sidekiq-unique-jobs with Sidekiq Enterprise's periodic and unique jobs, respectively, when it's available. When Sidekiq Enterprise is not available, we can keep sidekiq-cron, and maybe sidekiq-unique-jobs (if it's even really needed after fc1b739dab603c45d6fe00fe99e77138a69c30d6). When Sidekiq Pro is available but Sidekiq Enterprise is not, we can enable super_fetch and reliable_push, plus any other reliability enhancements.

ezekg commented 1 month ago

Let's start out by removing sidekiq-unique-jobs because I'm still seeing performance issues related to Lua scripts from it, even after my fix (and I don't have the drive to debug it anymore). We no longer use it for anything mission critical, so might as well rip it out since it's just been causing problems and outages lately and has severely limited overall scalability.