Heroku App Pinger

Tram Ho

Introduce

Heroku is a great platform for deploying web applications for many purposes with many benefits that it brings such as connecting with Github and automatically deploying through Github, with many tools and “buildpack” attached … Show Heroku is letting us use the service for free, but it comes with the condition that if we don’t access the application for a period of time, the application will enter a “sleep” state and re-access it. It will take quite a while to load (usually 5-10 seconds). It’s a pretty bad thing to have to wait for a while, it feels like waiting for a “link skip” page. sdfsdfsdf

Heroku App Pinger

There are many ways to keep the Heroku application always “awake” but in this article I will use a third party, Uptime Robot . The idea is that I will use Uptime Robot to ping my site after a period of time (n minutes) and adjust n so that n is less than the time that the application will enter the “sleep” state. 30p). The downside of this approach is that our application will be dependent on a third party and will not be able to assert that the application will always be in “wake” state and must have faith =))) First, You go to https://uptimerobot.com/ and create an account for yourself

Once you have an account, I will go to + Monitor and fill in the following parameters

  • Monitor Type: select Ping
  • Friendly Name: name of the monitor being created
  • IP (or Host): to link to the heroku application you want to ping
  • Monitoring Interval: interval between pings (should be below 30p)

After clicking Create Monitor, a monitor is created and you can monitor via the Quick Stats panel on the right of the screen. My article here is over and wish you all success. Gud luk !!

Share the news now

Source : Viblo