PlanetScale has introduced a mechanism to control Sidekiq jobs in production without requiring code deploys. This is achieved by integrating Sidekiq client middleware with a feature flagging system (Flipper). This allows for immediate disabling of specific job classes by enabling a corresponding feature flag. This capability enhances operational flexibility and reduces the risk associated with urgent hotfixes. The system also incorporates strategies for self-healing background jobs by storing state in the database, using scheduler jobs to re-queue missed tasks, implementing bulk scheduling for efficiency, adding jitter to spread out job execution, and handling job uniqueness through database locks and Sidekiq's unique jobs feature.
All PlanetScale trails