Introducing Production Check
Posted by Jonathan
Entering production is a key transition in your app’s lifecycle; it signals that your app will be delivering value to end users. You are no longer optimizing for testing—you are optimizing for performance and reliability, and there are new factors to consider at this stage.
Today we’re announcing Production Check, an enhancement to the Heroku Dashboard that helps ensure that your app is ready to go to production. Production Check tests your app’s configuration against a set of optional—but highly recommended—criteria. It makes it easy to ensure that your app’s configuration lends itself to maximum uptime. Moreover, it ensures that you have tools available for understanding and monitoring the factors that contribute to uptime.
How to Check Your App
To run Production Check, click the “Run Production Check” link in the header for any app in the Heroku Dashboard.
Production Check will run a series of tests on your app that we recommend for maintaining and monitoring availability. Each check includes useful links to the Heroku Dev Center and other related resources. Let’s look at a few of the areas it focuses on:
Previously, it was recommended to point your app's DNS directly to Heroku's three provided IP addresses. Now, the Cedar stack allows you to point your app to
app-name.herokuapp.com or a
*.herokussl.com domain rather than a legacy IP address. This ensures that in the event of an infrastructure-level issue, core components can be replaced without requiring you to make changes to your apps.
Although an app may not require the resources of more than a single dyno, we recommend running at least 2 dynos for a production app. One reason for this is that dynos restart roughly every 24 hours, and dyno redundancy helps ensure that you don't experience excessive queueing or dropped requests while a single dyno restarts. Additionally, dynos and the processes running on them can occasionally crash, and having another dyno helps ensure that you don't have downtime while that dyno recovers. Finally, single web dynos sleep after an hour of inactivity, and having a second dyno means that all dynos will stay awake.
Inevitably, performance issues and downtime occur. It’s important to have tools available that monitor how often and why it happens to your app. New Relic is a great tool for getting immediate, specific visibility into your app’s performance and availability. Not sure why a specific action takes so long in your app? New Relic can help you identify the specific line of code responsible for the slowness.
While New Relic gives you visibility into factors that contribute to downtime and performance issues, it’s important to have log-monitoring tools like Papertrail to monitor for events more specific to your app—for example, you might want to be alerted if there’s a sudden spike in failed credit card authorizations. While Heroku’s log for your app only goes back 1500 lines (which for a large production site may only represent seconds of activity), these add-ons also allow you to search days or weeks back through your app’s logs, allowing you to understand the context in which an error occurred.
Let Us Know What You Think
Heroku defines a “production app” as an app with 2 or more dynos and a production-tier Postgres database (if one is present). While far from exhaustive, the tests Production Check provides give additional guidance in getting you and your app prepared to handle the challenges your app will face as it moves into production.
With Production Check, you can save time in getting apps ready for launch day while learning best practices on Heroku. Go to the Heroku Dashboard now and give it a try.
If you have questions or comments about Production Check, email us at email@example.com.