SidekiqHerokuRedis calculator

Redis connection and concurrencies calculator for hosting Sidekiq on Heroku with Redis to Go

Simple calculator to calculate how many concurrencies and Redis connections you have to define for working with on


 

If you're using Unicorn, you have to fill in the number you've defined in worker_processes from your app/config/unicorn.rb file.

Number of connections per Web dyno, (per Unicorn worker) minimum 1. Only change this value if you query the Redis database more than just for adding tasks to the Sidekiq queue.


  • Sidekiq concurrencies
  • Sidekiq server connections
# app/config/initializers/sidekiq.rb
require 'sidekiq'

Sidekiq.configure_client do |config|
  config.redis = { :size => 0 }
end

Sidekiq.configure_server do |config|
  # The config.redis is calculated by the 
  # concurrency value so you do not need to 
  # specify this. For this demo I do 
  # show it to understand the numbers
  config.redis = { :size => 0 }
end
# app/config/sidekiq.yml
:concurrency: 0

Note: You might also need to increase the pool size of your AR database.
See: Advanced Options - Concurrency