Rails Autoscale | Heroku Dev Center Skip NavigationShow navHeroku Dev Center Get Started Documentation Changelog Search Get Started Node.js Ruby on Rails Ruby Python Java PHP Go Scala Clojure Documentation Changelog MoreAdditional Resources Home Elements Products Pricing Careers Help Status Events Podcasts Compliance Center Heroku BlogHeroku Blog Find out what's new with Heroku on our blog. Visit Blog Log inorSign up View categories Categories Heroku Architecture Dynos (app containers) Stacks (operating system images) Networking & DNS Platform Policies Platform Principles Command Line Deployment Deploying with Git Deploying with Docker Deployment Integrations Continuous Delivery Continuous Integration Language Support Node.js Ruby Working with Bundler Rails Support Python Working with Django Background Jobs in Python Java Working with Maven Java Database Operations Working with the Play Framework Java Advanced Topics Working with Spring Boot PHP Go Go Dependency Management Scala Clojure Databases & Data Management Heroku Postgres Postgres Basics Postgres Performance Postgres Data Transfer & Preservation Postgres Availability Postgres Special Topics Heroku Redis Apache Kafka on Heroku Other Data Stores Monitoring & Metrics Logging App Performance Add-ons All Add-ons Collaboration Security App Security Identities & Authentication Compliance Heroku Enterprise Private Spaces Infrastructure Networking Enterprise Accounts Enterprise Teams Heroku Connect (Salesforce sync) Single Sign-on (SSO) Patterns & Best Practices Extending Heroku Platform API App Webhooks Heroku Labs Building Add-ons Add-on Development Tasks Add-on APIs Add-on Guidelines & Requirements Building CLI Plugins Developing Buildpacks Dev Center Accounts & Billing Troubleshooting & Support Add-ons All Add-ons Rails Autoscale This add-on is operated by Rails Autoscale Simple, reliable queue-based autoscaling for your Rails app. Rails Autoscale Last updated 14 June 2020 Table of Contents Full documentation How is this different from Heroku’s own autoscaling? Installation Adjust your settings in the Rails Autoscale dashboard Worker autoscaling Troubleshooting Migrating between plans Removing the add-on Support Rails Autoscale is an add-on that automatically scales web and worker dynos for Rails applications. Autoscaling ensures that your app can gracefully handle increased traffic while only paying for the dynos you need. Full documentation This documentation page is a high-level summary. See the official documentation site for more. How is this different from Heroku’s own autoscaling? Heroku offers a native autoscaling solution that’s worth a try if you run performance dynos and you only need to autoscale web dynos. Rails Autoscale goes beyond this by autoscaling based on request queue times, autoscaling worker dynos, and working with all dyno types. For more info, check out the common questions doc. Installation I’ll walk you through the full installation and setup process in the 5-minute video below. Additional instructions are in the getting started guide. Rails Autoscale can be installed from railsautoscale.com, the Heroku Elements marketplace, or the via CLI: Check out Rails Autoscale on Heroku Elements for pricing and plans. $ heroku addons:create rails-autoscale -----> Adding RAILS_AUTOSCALE_URL to sharp-mountain-4005... done, v18 (free) After Rails Autoscale is provisioned, a RAILS_AUTOSCALE_URL config var is available in the app configuration. You don’t have to do anything with it. This setting is used by the rails_autoscale_agent gem when communicating with the Rails Autoscale service. Rails Autoscale supports Rails 3.2+ and Ruby 1.9.3+. If you run into any trouble with the initial setup, check out the official getting started docs or the troubleshooting guide. Adjust your settings in the Rails Autoscale dashboard After you install the gem and deploy your application, you’ll begin to see activity in your Rails Autoscale dashboard. Access the dashboard via the CLI: $ heroku addons:open rails-autoscale Opening RAILS_AUTOSCALE_URL for sharp-mountain-4005 You can also access the dashboard from your app’s Heroku Dashboard: The Rails Autoscale dashboard documentation is here. Request queue time threshold Rails Autoscale triggers scale events by monitoring the request queue time for every request. This is the time between Heroku accepting a request and your application beginning processing. Queue time will increase when your application servers are too busy to handle all incoming requests. For a thorough explanation of queue time, read Nate Berkopec’s excellent article “Scaling Ruby Apps to 1000 Requests per Minute - A Beginner’s Guide”. Rails Autoscale tracks the 95th percentile queue time, which for most applications will hover well below the default threshold of 100ms. A breach of this threshold will trigger an UPSCALE for your application, adding one web dyno. After 10 minutes of measurements below the downscale threshold (50ms by default), a DOWNSCALE event is triggered. Rails Autoscale’s queue time metrics will not match APM tools like Scout and New Relic. Those tools typically show an average, while Rails Autoscale tracks the 95th percentile. Settings page Rails Autoscale provides default settings that work for most apps, but some apps may need a higher or lower threshold. These settings are described in detail in the official docs. Worker autoscaling Rails Autoscale supports autoscaling worker dynos that are using Sidekiq, Resque, Delayed Job, or Que. It’s as easy as autoscaling your web dynos, and the settings page will walk you through the setup. See the launch announcment for a video walkthrough. Troubleshooting Check out the official troubleshooting guide if you run into any problems. If you’re still stuck, please email help@railsautoscale.com. Migrating between plans Use the heroku addons:upgrade command to migrate to a new plan. $ heroku addons:upgrade rails-autoscale:newplan -----> Upgrading rails-autoscale:newplan to sharp-mountain-4005... done, v18 ($49/mo) Your plan has been updated to: rails-autoscale:newplan Removing the add-on Rails Autoscale can be removed via the CLI. This will destroy all associated data and cannot be undone! $ heroku addons:destroy rails-autoscale -----> Removing rails-autoscale from sharp-mountain-4005... done, v20 (free) Support All Rails Autoscale support and runtime issues should be submitted via Heroku’s Support channels or emailed to help@railsautoscale.com. Keep reading All Add-ons Feedback Log in to submit feedback. Ziggeo Raygun Crash Reporting Information & Support Getting Started Documentation Changelog Compliance Center Training & Education Blog Podcasts Support Channels Status Language Reference Node.js Ruby Java PHP Python Go Scala Clojure Other Resources Careers Elements Products Pricing Subscribe to our monthly newsletter Your email address: RSS Dev Center Articles Dev Center Changelog Heroku Blog Heroku News Blog Heroku Engineering Blog Heroku Podcasts Twitter Dev Center Articles Dev Center Changelog Heroku Heroku Status Facebook Instagram Github LinkedIn YouTube Heroku is acompany  © Salesforce.com heroku.com Terms of Service Privacy Cookies