Project
tj-scale
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).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Development
Licenses
MIT