<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: eabraham</title>
    <description>The latest articles on DEV Community by eabraham (@eabraham).</description>
    <link>https://dev.to/eabraham</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F837684%2F548dc811-e0fd-49d2-8c24-90876800627c.png</url>
      <title>DEV Community: eabraham</title>
      <link>https://dev.to/eabraham</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eabraham"/>
    <language>en</language>
    <item>
      <title>Level up your Heroku autoscaling in 15 minutes</title>
      <dc:creator>eabraham</dc:creator>
      <pubDate>Tue, 05 Apr 2022 12:31:34 +0000</pubDate>
      <link>https://dev.to/eabraham/level-up-your-heroku-autoscaling-in-15-minutes-jd7</link>
      <guid>https://dev.to/eabraham/level-up-your-heroku-autoscaling-in-15-minutes-jd7</guid>
      <description>&lt;p&gt;One of the most powerful features of Dynoscale’s Heroku autoscaling is the ability to configure it to meet the needs of your app without needing to write complex code. This tutorial will show you how to make advanced use of Dynoscale’s &lt;a href="https://dynoscale.net"&gt;Heroku autoscaling&lt;/a&gt; to meet the needs of your app’s unique performance requirements. It will also show you how to enable the highest levels of autoscaling for your app with just a few configuration steps.&lt;/p&gt;

&lt;p&gt;This post covers advanced Heroku autoscaling topics that build upon a &lt;a href="https://dynoscale.net/blog/how-to-setup-heroku-autoscaling-in-under-15-minutes"&gt;prior post covering the basics&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tuning Web Request Queuing
&lt;/h2&gt;

&lt;p&gt;For a great end-user experience on your website, lowering backend latency is crucial. Amazon discovered ten years ago that every 100ms of latency cost them 1% in sales. Google discovered that adding 0.5 seconds to the generation time of a search page &lt;a href="http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html"&gt;reduced traffic by 20%&lt;/a&gt;. We can match the correct thresholds for your traffic to reduce queue time by spending a few minutes examining the Web Dyno Activity report. Your users and customers will be able to load a page of your site faster if the queue time is reduced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cqy2e0Uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_1-fb9b1eff71bbc2c79796bc906a189d9c51af109d02bbc70f3a2daa9f94c532e1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cqy2e0Uo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_1-fb9b1eff71bbc2c79796bc906a189d9c51af109d02bbc70f3a2daa9f94c532e1.png" alt="Nearing Upper Threshold" width="880" height="190"&gt;&lt;/a&gt; Navigate to the Web Dyno Activity report. Dynoscale sets your web upscale and downscale thresholds to 100 and 50 milliseconds, respectively, by default. These are useful settings, but it's possible that your application has a unique traffic pattern, in which case different thresholds would improve your autoscaling. Take the case above: the queue time was high from 1:00 AM to 1:30 AM, however the auto upscale was not triggered. This means that queries in the p95 category experienced roughly 100 milliseconds of additional backend request time due to queue time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PH-eIRPL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_2-83dc0d46c44fb9e7917524ea360f6411518e49384f28e401b3d5aaf5b8a81d7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PH-eIRPL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_2-83dc0d46c44fb9e7917524ea360f6411518e49384f28e401b3d5aaf5b8a81d7f.png" alt="Adjusting Upper Threshold" width="880" height="246"&gt;&lt;/a&gt; In this case, I recommend lowering the upscale threshold to 90ms and monitoring to see if auto scaling performance improves. Keep in mind not to overfit your thresholds based on a specific scenario. This frequently results in completely unanticipated behavior outside of the specific scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost cutting during known periods of lower traffic
&lt;/h2&gt;

&lt;p&gt;Imagine a scenario where your application provides a service for business users who mostly use it during weekdays. On weekends, your application receives significantly less traffic and you would like to run one web dyno instead of two during this period to cut costs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3A9vJSs6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_3-63a7a172cebd122f1d9b3741c6f1e8e833591f78ab40c390874f18c644678af6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3A9vJSs6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_3-63a7a172cebd122f1d9b3741c6f1e8e833591f78ab40c390874f18c644678af6.png" alt="New Rule" width="880" height="246"&gt;&lt;/a&gt; Navigate to Web Dyno Auto Scaling Page and create a new rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wOeYqFqI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_4-5513a1763a27836734ded1539e49a1fe45d0e83f6006dc59e499f15c90ec71e4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wOeYqFqI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_4-5513a1763a27836734ded1539e49a1fe45d0e83f6006dc59e499f15c90ec71e4.png" alt="Create New Rule" width="880" height="388"&gt;&lt;/a&gt; In the new rule set the lower dyno bound to one and match the upper bound to the default rule’s. Set the Start At and End At to "12:00:00 AM" and "11:59:59 PM", respectively, and the Day of Week to "Weekend". Click Save to commit the rule and downscale to one dyno on weekends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing for a period of planned higher traffic
&lt;/h2&gt;

&lt;p&gt;Consider a scenario in which your app's marketing team is about to launch a major campaign at 10 a.m. the next day (a Tuesday). You need to increase the dyno ranges to four and eight for a twelve-hour period to ensure the application can manage the increased traffic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TzXGTZyT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_5-63a7a172cebd122f1d9b3741c6f1e8e833591f78ab40c390874f18c644678af6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TzXGTZyT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_5-63a7a172cebd122f1d9b3741c6f1e8e833591f78ab40c390874f18c644678af6.png" alt="Create New Rule" width="880" height="246"&gt;&lt;/a&gt; In advance of the campaign, navigate to Web Dyno Auto Scaling Page and create a new rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sNXOa0xd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_6-9f6ca30278aa43792c43468abda3740e2aca993e51449003fcaa4b8ae2332a5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sNXOa0xd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_6-9f6ca30278aa43792c43468abda3740e2aca993e51449003fcaa4b8ae2332a5e.png" alt="Edit Rule" width="880" height="422"&gt;&lt;/a&gt; In the new rule set the lower dyno bound to four and the upper bound to eight. Next, set the Day of Week to "Tuesday" and the Start At and End At to "10:00:00 AM" and "10:00:00 PM" respectively. Click Save to create the new rule.&lt;/p&gt;

&lt;p&gt;Once the campaign has run its course, delete this new auto scaling rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimizing for cost savings over traffic demand
&lt;/h2&gt;

&lt;p&gt;When analyzing the Web Dyno Activity report, it may become clear that small bursts of traffic are driving your application to auto scale up. However, the traffic drops off soon, and you end up running extra dynos. Reducing the upscale dyno increment and the downscale cooldown time would be beneficial.&lt;/p&gt;

&lt;p&gt;The scale up increment is two, and the downscale cool down is one hundred and twenty seconds in this situation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zlRL3Yz9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_7-78b9f16f783d4619b12736b925757153de31b5209148e7b3ae4644a81d0be99a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zlRL3Yz9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_7-78b9f16f783d4619b12736b925757153de31b5209148e7b3ae4644a81d0be99a.png" alt="Edit Rule" width="880" height="239"&gt;&lt;/a&gt; Navigate to Web Dyno Auto Scaling Page and edit the active rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ROz8DT1h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_8-e1efe299934c0b463815fb33790176bd6f9c23cae88bc0dd6c0e0f4886a6f419.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ROz8DT1h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_8-e1efe299934c0b463815fb33790176bd6f9c23cae88bc0dd6c0e0f4886a6f419.png" alt="Edit Rule" width="880" height="245"&gt;&lt;/a&gt; Reduce the upscale increment from two to one and the downscale cooldown to sixty seconds. Click Save to commit the rule and cut costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimizing for traffic demand over cost savings
&lt;/h2&gt;

&lt;p&gt;When checking the Web Dyno Activity report, it may be obvious that heavy loads are driving your service to auto scale up, but scaling up to meet demand can take a long time. Users of your application will encounter increased queue time and a worse experience during this scaling up phase. Increasing the upscale dyno increment and reducing the upscale cooldown time would be useful.&lt;/p&gt;

&lt;p&gt;The scale up increment is two, and the autoscale cool down is sixty seconds in this instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TnQ8u4qR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_9-7923ff806b7354fa74f2c0b6974d2f2086a301c9254b2e071332d088db3d8b78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TnQ8u4qR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_9-7923ff806b7354fa74f2c0b6974d2f2086a301c9254b2e071332d088db3d8b78.png" alt="Edit Rule" width="880" height="238"&gt;&lt;/a&gt; Navigate to Web Dyno Auto Scaling Page and edit the active rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uvUNT5ob--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_10-556d24ed0bb2455b2828f788fda733d325fbe99c49bbf8290ce7b94efdf383f8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uvUNT5ob--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/advanced_autoscaling_10-556d24ed0bb2455b2828f788fda733d325fbe99c49bbf8290ce7b94efdf383f8.png" alt="Edit Upscale Increment and cool down" width="880" height="246"&gt;&lt;/a&gt; Increase the upscale increment from two to four and decrease the upscale cooldown to thirty seconds. Click Save to commit the rule and improve request queue time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The flexibility to tailor Dynoscale's Heroku autoscaling to fit your app's needs without having to write sophisticated code is one of its most powerful features. This tutorial showed you how to use Dynoscale's Heroku autoscaling in a more complex way to fulfill the performance requirements of your app. It also demonstrated how to adjust just a few configuration settings to enable the maximum capabilities of autoscaling for your app.&lt;/p&gt;

</description>
      <category>heroku</category>
      <category>rails</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to setup heroku autoscaling in under 15 minutes?</title>
      <dc:creator>eabraham</dc:creator>
      <pubDate>Mon, 28 Mar 2022 12:46:43 +0000</pubDate>
      <link>https://dev.to/eabraham/how-to-setup-heroku-autoscaling-in-under-15-minutes-4li6</link>
      <guid>https://dev.to/eabraham/how-to-setup-heroku-autoscaling-in-under-15-minutes-4li6</guid>
      <description>&lt;p&gt;You don’t have to be a Heroku veteran to setup autoscaling. But the surprising thing is that 63% of Heroku App Owners don’t setup autoscaling. By investing 15 min of your time, you can get started adding autoscaling to your app. Let’s walk through the simple, straightforward process to get autoscaling setup on your application so you can start saving money today.&lt;/p&gt;

&lt;p&gt;Autoscaling is a useful tool to help you improve your application availability. It allows you to scale up or scale down dynos automatically in response to system traffic. This is useful because it can increase the number of dynos during traffic spikes and decrease the number of dynos during quiet periods to save cost but maintain availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Heroku's Autoscaling a good fit for me?
&lt;/h2&gt;

&lt;p&gt;Heroku offers dyno autoscaling but there are limitations to their solution. Before setting up, lets review those limitations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are you running performance dynos?
&lt;/h2&gt;

&lt;p&gt;If yes, Heroku will allow your application to autoscale. If you are running standard Dynos, unfortunately Heroku doesn't support Autoscaling at this time. Checkout another solution detailed &lt;a href="https://dynoscale.net/blog/how-to-setup-heroku-autoscaling-in-under-15-minutes#dynoscale-autoscaling#dynoscale-autoscaling"&gt;below&lt;/a&gt;, that supports standard dyno Heroku Autoscaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do all HTTP requests take about the same time?
&lt;/h2&gt;

&lt;p&gt;If yes, Heroku scaling can be a good fit for you. If your request have a high variance in backend latency (200-500ms), its likely that Heroku's autoscaling will trigger many false positives and cost you more in unneeded dyno time. This is due to Heroku's autoscaling metric being Response time instead of Queue time.&lt;/p&gt;

&lt;p&gt;If you have this problem checkout another solution detailed &lt;a href="https://dynoscale.net/blog/how-to-setup-heroku-autoscaling-in-under-15-minutes#dynoscale-autoscaling#dynoscale-autoscaling"&gt;below&lt;/a&gt;, that can handle Heroku Autoscaling with high variance in backend latency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are you running in a private space?
&lt;/h2&gt;

&lt;p&gt;If yes, then you are in luck. Heroku supports scaling for applications hosted on a private space. If you are not on a private space checkout the other solution detailed &lt;a href="https://dynoscale.net/blog/how-to-setup-heroku-autoscaling-in-under-15-minutes#dynoscale-autoscaling#dynoscale-autoscaling"&gt;below&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heroku Autoscaling
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;Navigate to the Resources tab of your application on the Heroku Dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E_olsy91--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_autoscale_disabled-2f031c67d159d2b1d3347e6ed8187e98089e2fac49de0a0ba6c2664a97245fd3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E_olsy91--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_autoscale_disabled-2f031c67d159d2b1d3347e6ed8187e98089e2fac49de0a0ba6c2664a97245fd3.webp" alt="Heroku Autoscale Disabled" width="880" height="152"&gt;&lt;/a&gt;Click on the Enable Autoscaling button next to your web dyno details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QKEWez_X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_autoscale_enabled-b65174f68a11afabce25c48a845bf68108b234b47ec1cb5effbf32fde94272b9.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QKEWez_X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_autoscale_enabled-b65174f68a11afabce25c48a845bf68108b234b47ec1cb5effbf32fde94272b9.webp" alt="Heroku Autoscale Enabled" width="880" height="143"&gt;&lt;/a&gt;Select the upper and lower bounds for your applications autoscale range. A preview of the monthly cost range will appear below the dyno range. Your dyno count will always be scaled to a quantity inside the range you specify.&lt;/p&gt;

&lt;p&gt;Next you set the desired p95 Response Time for your application. This value is the threshold used by Heroku's autoscaling engine to determine how to scale your dynos. A recommended p95 response time is listed below this field.&lt;/p&gt;

&lt;p&gt;Then, if you would like to receive an Email Notification when your application is autoscaled to the max dynos check the box. This notification is sent at most once per day.&lt;/p&gt;

&lt;p&gt;Finally, click Confirm to save your autoscale configuration. This will immediately adjust the dynos of your application to conform to the autoscale configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Autoscaling Logic
&lt;/h3&gt;

&lt;p&gt;The autoscaling engine uses the Desired p95 Response Time set in the prior step to determine when to scale your app. The autoscaling algorithm looks back over the past hour to calculate the number of dynos required to achieve the desired response time for 95% of incoming requests.&lt;/p&gt;

&lt;p&gt;When the engine deems the number of dynos incorrect, a single dyno is either added or removed from your app. No more than 1 Autoscaling event can occur in 1 minute.&lt;/p&gt;

&lt;p&gt;The autoscaling engine scales down less quickly than it scales up. This is to protect against a substantial downscaling from a temporary lull in requests resulting in high latency if demand spikes upward soon after.&lt;/p&gt;

&lt;p&gt;If there is no request throughput your application for 3 minutes, dynos will scale down at 1-minute intervals until throughput resumes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring Autoscale Events
&lt;/h3&gt;

&lt;p&gt;Navigate to the Metrics tab of your Heroku application. Scaling events can be seen in the Events chart. By hovering over a scaling event you can see what initiated it. Heroku autoscaling events are labeled “Dyno Autoscaling”. If multiple autoscaling events occur in the same period, only the step where the scaling changed direction is shown.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disabling Autoscaling
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ds8txpp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_disable_autoscale_confirm-3c9a1dcc2d3f29a336482002b6fcb950c2297847b3054a7f229637a9782f4d11.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ds8txpp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_disable_autoscale_confirm-3c9a1dcc2d3f29a336482002b6fcb950c2297847b3054a7f229637a9782f4d11.webp" alt="Heroku Autoscale Disable Confirmation" width="880" height="147"&gt;&lt;/a&gt;To disable heroku autoscaling navigate to the Resources tab of your application on the Heroku Dashboard. Then click on the Disable Autoscaling button and select a fixed dyno count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dynoscale Autoscaling
&lt;/h2&gt;

&lt;p&gt;Dynoscale is a &lt;a href="https://dynoscale.net/blog/how-to-setup-heroku-autoscaling-in-under-15-minutes"&gt;Heroku Autoscaling&lt;/a&gt; Addon that solves many of the limitations of Heroku's autoscaling engine. It works for both standard and performance dynos, letting you decide the proper resources for your application. In addition, Dynoscale uses queues time instead of response time to scale your application. This ensures that long running application code doesn't scale based on a false positives from a &lt;a href="https://dynoscale.net/blog/why-is-queue-time-more-important-than-backend-request-time-to-auto-scaling"&gt;Response Time metric&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;Dynoscale currently supports Ruby and Python applications. To install for a Rails/Ruby Application, follow these &lt;a href="https://dynoscale.net/documentation/getting-started-ruby-rails"&gt;getting started instructions&lt;/a&gt;. To install for a Python Application, follow these &lt;a href="https://dynoscale.net/documentation/getting-started-python"&gt;getting started instructions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cWKtpTyu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_addons_config-a302973a7dd275c81bd94646861043163d33065f7fc1d7e146ce0763287a7c97.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cWKtpTyu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/blog/heroku_addons_config-a302973a7dd275c81bd94646861043163d33065f7fc1d7e146ce0763287a7c97.webp" alt="Heroku Addon Configuration" width="880" height="303"&gt;&lt;/a&gt;Once you have installed the Dynoscale addon, next lets setup the scaling rules by specifying the Autoscaling Logic. For those with the &lt;a href="https://devcenter.heroku.com/articles/heroku-cli"&gt;Heroku CLI installed&lt;/a&gt;, in a terminal run &lt;code&gt;heroku addons:open dscale&lt;/code&gt;. For those who do not have the Heroku CLI installed, navigate to the Resource tab of your application in the Heroku Dashboard and click on Dynoscale.&lt;/p&gt;

&lt;h3&gt;
  
  
  Autoscaling Logic
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--230IyScw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule-8e03b5b2ad155219869ebb8460a87adaa71c146d89d0a0dbdee6f762a7e189b6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--230IyScw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule-8e03b5b2ad155219869ebb8460a87adaa71c146d89d0a0dbdee6f762a7e189b6.png" alt="Web Autoscale Rule" width="880" height="317"&gt;&lt;/a&gt;Next navigate to the Web Autoscale Rules to setup the autoscaling logic. Click on the blue edit rule button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ekF9D2yt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_dynos-fcb63b67df22b3bb39bd77702907aaab482226d5ba431aefbb031abb6a22be47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ekF9D2yt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_dynos-fcb63b67df22b3bb39bd77702907aaab482226d5ba431aefbb031abb6a22be47.png" alt="Web Autoscale Rule Edit Dyno Range" width="880" height="327"&gt;&lt;/a&gt;On the upper left side of the rule you can see the upper and lower bounds for dynos. These bounds set the max/min dynos this rule will permit. For a relatively low traffic application with some periods of high traffic its sensible to set the lower bound to 1 and the upper bound to 2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aOKzZAJy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_thresholds-52d5a45df4620dabc06b0ecc5fe0729768e704583db58dfd26e9c6291d39abd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aOKzZAJy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_thresholds-52d5a45df4620dabc06b0ecc5fe0729768e704583db58dfd26e9c6291d39abd6.png" alt="Web Autoscale Rule Edit Thresholds" width="880" height="327"&gt;&lt;/a&gt;On the lower left side of the rule you can see the Upscale and Downscale Configuration. On the Upscale configuration, the first field is the request queue threshold. It determines when more dynos are needed to meet the traffic needs of your application. Once the threshold is exceeded, Dynoscale will upscale your application by an increment set in the next field. Finally, to avoid frequent scale ups, the last field delays incremental scaleups with a buffer time.&lt;/p&gt;

&lt;p&gt;On the Downscale configuration, the first field is the request queue threshold. It determines when to reduce the dynos needed to meet the traffics needs of your application. Once the request queue drops below the threshold, Dynoscale will downscale your application by an increment set in the next field. Finally, to avoid frequent scaling, the last field delays incremental scale downs with a buffer time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zcyYPPAX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_save-4449a4fae8021622614152ac0a00a7c3f83d251c7f225682f085afdb8a0c6f0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zcyYPPAX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_edit_annotate_save-4449a4fae8021622614152ac0a00a7c3f83d251c7f225682f085afdb8a0c6f0d.png" alt="Web Autoscale Rule Save" width="880" height="332"&gt;&lt;/a&gt;Once you are happy with a rule, click on the green save button in the upper right side of the rule. Alternatively, if you don't want to save changes, click on the black cancel button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wIJ4zGHZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_rules_on-a74a96441772946dc45cc1c39fc206f24e71739bf4586fa5bcc2cdc53b93b002.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wIJ4zGHZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_rules_on-a74a96441772946dc45cc1c39fc206f24e71739bf4586fa5bcc2cdc53b93b002.png" alt="Web Autoscale Rule On" width="880" height="342"&gt;&lt;/a&gt;Finally click on the toggle on the upper right side of the page. Red indicates that your rules are off and green your rules are active.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring Autoscale Events
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SuBfC4R1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/heroku_web_activity_charts-c40ab6588612c122c38df8ed6d0a310b09c99e7af64481d86bf7d836140968fa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SuBfC4R1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/heroku_web_activity_charts-c40ab6588612c122c38df8ed6d0a310b09c99e7af64481d86bf7d836140968fa.png" alt="Web Dyno Activity" width="880" height="516"&gt;&lt;/a&gt;In addition to the Heroku Dashboard, Scaling information can be found on the Web Dyno Activity Page. This page displays queue time and dyno scaling charts for the past 24 hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disabling Autoscaling
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SANkFAUJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_rules_off-b87573ff97e2179a3d4534127fda4154ecd892d7070940b08eb1e89f38a06c51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SANkFAUJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dynoscale.net/assets/knowledgebase/default_rule_rules_off-b87573ff97e2179a3d4534127fda4154ecd892d7070940b08eb1e89f38a06c51.png" alt="Web Dyno Activity" width="880" height="375"&gt;&lt;/a&gt;To turn off autoscaling for your Heroku application. Navigate to the Web Autoscaling Rules page and click on the toggle in the upper right-hand side of the screen. Red means the rule is off.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;This article explores the scenarios for which Heroku Autoscaling is a good fit for your application. In addition, it details the setup procedure for Heroku Autoscaling.&lt;/p&gt;

&lt;p&gt;If Heroku Autoscaling is not a good fit this article details an alternative called Dynoscale and outlines quick, easy setup instructions.&lt;/p&gt;

</description>
      <category>heroku</category>
      <category>rails</category>
      <category>python</category>
    </item>
  </channel>
</rss>
