TjScaleRuby reports metrics from your Rails app to an TJ Scale (or compatible) control plane so it can autoscale Heroku formation from rules you configure there. Behavior at a glance: - Runs a background loop on exactly one dyno: web.1 or worker.1 (configurable). - Worker reporter: waiting job count and oldest-job age (queue_time_s) from Delayed Job or Sidekiq — pick with TJ_SCALE_JOB_BACKEND (auto-detected by default). - Web reporter: router queue_time_ms (Rack middleware + X-Request-Start), request volume, and average response time per reporting interval. - Sends target Heroku app and process type on every POST; scaling limits (min/max dynos) are configured in the control plane's dashboard settings. - Configure with environment variables; no Rails initializer required. Requires Rails 6.1+ and Ruby 3.0+. Bring your own queue gem: delayed_job_active_record or sidekiq (worker reporters only).

Required Ruby Version

>= 3.0.0

Authors

Tanuj

Versions

  1. 1.1.0 June 12, 2026 (20 KB)
  2. 1.0.2 June 12, 2026 (19 KB)
  3. 1.0.1 June 12, 2026 (19 KB)
  4. 1.0.0 June 12, 2026 (18.5 KB)

Pushed by

SHA 256 checksum