RubyGems Navigation menu

tj-scale 1.0.0

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).

Gemfile:
=

install:
=

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)

Runtime Dependencies (2):

openssl ~> 3.2
rails >= 6.1, < 9

Development Dependencies (7):

bundler >= 2.0, < 5
pry ~> 0.14
rake ~> 13.0
rspec ~> 3.0
standard ~> 1.3
webmock ~> 3.0

Owners:

Pushed by:

Authors:

  • Tanuj

SHA 256 checksum:

=

Total downloads 707

For this version 143

Version Released:

License:

MIT

Required Ruby Version: >= 3.0.0

Links: