How to Run your Openshift Application without Idling
Kirtan Thakkar
Life is all about learningOpenShift is great to run your small website or application in the cloud. The main advantage is, it gives free 3 small gears. It can easily handle your personal or small amount of traffic. But it gets into idle mode when not used for 24 hours. So if there isn't any HTTP request in 24 hours, your application will be in idle mode. And next time, when it receives the request it will take a little bit longer to respond as it needs to start your gear and then responds to the request.
To stop your application from idling, you need a ping service which sends HTTP requests to your server on a regular interval, so that your application never gets into the idle mode.
UptimeRobot is one such service, which can send HTTP(s) requests to your application, and will prevent your application from idling.
Setup UptimeRobot:
- Create an account at UptimeRobot (Skip if you already have)
- Sign In to your Account
- Go to My Settings from the top and Add Alert Contacts. You need to add how you want to be alerted when server goes down, via Email, Pushbullet, Slack etc. Add the method you would like to.
- Create a new Monitor for your application
- Select HTTP(s) for the Monitor Type
- Add Name of the monitor, URL (Your OpenShift application URL) and Monitoring Interval (30 minutes should be good).
- Choose the contacts from the right side panel and click on Create Monitor. Done!
You can also monitor stats from the UptimeRobot Dashboard. You can add upto 50 monitors on UptimeRobot with the free account.
Now, your OpenShift application will never be idled.