When your webserver goes down, you need find out why the webserver went down and fix the issue. But even before you troubleshoot and fix the issue, you need to make sure your webserver is available to your users so they can continue using your website. There are lot of sophisticated solutions are there, such as failing over to a redundant web server, or creating new instance using AWS AutoScaling. However this solutions comes with their own cost and complexity and if you are small shop like us you may not be able to afford it. And sometimes the simplest solution is to restart the webserver, if you don't have a failover server or AutoScaling configured for your server. If your infrastructure is on AWS, you can use couple of AWS services to restart the webserver automatically without any manual intervention. You need to use AWS CloudWatch Logs, CloudWatch Metrics, CloudWatch Alarm and AWS SystemManager RunCommand. Note that if you are using some Metrics published directly by AWS ser...
Comments