RubyGems Navigation menu

tj-scale 1.1.0

TJ Scale is a lightweight metrics agent that lets a TJ Scale dashboard autoscale your Heroku dynos based on real queue pressure instead of CPU or memory. Add the gem, set a few environment variables, and a background reporter starts on exactly one dyno (web.1 or worker.1 — your choice). Every few seconds it POSTs a small JSON payload to your dashboard, which applies the scaling rules, limits, and cooldowns you configure there and calls the Heroku Platform API. The gem itself never scales anything, keeping your app free of Heroku credentials. Worker mode reports the number of waiting jobs and the age of the oldest one, from either Delayed Job or Sidekiq (auto-detected). Web mode reports router queue time (via Rack middleware and the X-Request-Start header), request volume, and average response time. Zero-config inside Rails: no initializer needed, everything is driven by environment variables. Requires Rails 6.1+ and Ruby 3.0+. For worker metrics, bring your own queue gem (delayed_job_active_record or sidekiq).

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 627

For this version 242

Version Released:

License:

MIT

Required Ruby Version: >= 3.0.0

Links: