<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=204641&amp;fmt=gif">

Database Uptime 101

Posted by Lukas Vileikis on Sep 15, 2021 9:00:00 AM

If you have ever developed something, whether an application or a website, you probably know how critical uptime is. Uptime is not talked about since it’s frequently found to be imperative for most companies to complete their daily operations. Once our services are down, we are doing everything we can to make them available again because the longer they are down, the more issues will be caused. 

----------------------------------------------------------------------------------------------------------

 1-Aug-31-2021-07-51-06-37-AM

 

If you have ever developed something, whether an application or a website, you probably know how critical uptime is. Uptime is not talked about since it’s frequently found to be imperative for most companies to complete their daily operations. Once our services are down, we are doing everything we can to make them available again because the longer they are down, the more issues will be caused. 

Issues in this space can be very multi-faceted: the critical problem is that when databases or services go down, businesses aren’t available, and everything usually trickles down from there: 

 

1. Services go down. 
 
2. People cannot access certain services that are usually required for certain purposes (e.g logging into an application, completing a purchase, transferring money, etc.) 

3. People get annoyed or mad at the business – the more impactful the downtime is to the client, the more problems it will cause (for example, a bank service going down is going to causemuch more problems than, say, an unavailable gaming forum) 

4. Businesses usually apologize, say that such incidents are being looked after very strenuously., They say that if downtime occurs, it’s very minimal, and the business does everything it can do to minimize the impact of it. However, minimal downtime is not always achieved  - we have written why in some of our previous blog posts: a part of the reason why could be because we neglect to monitor database disk and memory usageif we find ourselves using MySQL, we must avoid certain anti-patterns to avoid this from occurring, etc.: if you are interested, check it out.
 
As you can probably tell, downtime of a service is never good news for anyone involved – we can do a couple of things to minimize its impact. 
 

How to Minimize Downtime? 

Minimizing downtime is not a new concept. There already are numerous services available helping to reduce the downtime of our services and databases, for example: 

  • - CDNs like CloudFlare, Google Cloud, Microsoft Azure CDN, and StackPath help us fend off different issues that might contribute to downtime, including DoS, DDoS attacks, attacks specifically directed at our applications and SQL databases, and other issues. 
  •  
  • - There are numerous businesses telling us how we should optimize our codebase to avoid downtime from occurring. 
  •  
  • - Hosting providers (InMotionHosting, etc.) frequently use marketing tactics that say something along the lines of “if you have more than X minutes downtime per year, we will refund everything that you bought from us; , your services are in good hands!” 
  •  
  • - Services like CloudFlare that pride themselves on eliminating the factors of system failure and thus downtime together, etc. 

As you can see, minimizing downtime comes down to a few key things: 

  1. 1. Using a proper codebase that is audited on and off. 
  1. 2. If possible, use a CDN to minimize downtime and prevent certain attacks from causing downtime to your business. 
  1. 3. Educate the staff inside of your company to follow best practices and reduce the risk of human error taking down your services. 
  1. 4. Avoid overloading your services (this one can be accomplished by using a CDN like CloudFlare too) 
  1. 5. Choose the providers of your hosting carefully – make sure that the uptime they offer is consistent with what you would need. 

 

Minimizing Downtime with dbWatch 

Once you make use of the steps outlined above, your business should be well equipped to handle downtime, but what if you want to avoid downtime for your database too? That’s where dbWatch can step in. Launch dbWatch, import your database instance (we will use MySQL in this case, dbWatch also supports other database instances like Oracle, SQL Server, Sybase, etc.), and on the left side of dbWatch you will be able to see available jobs. We will expand the Availability section: 

To make use of the database management system uptime job, simply right- click it, and, as it has no configurable parameters, run it, then observe the Details section: 

 

The availability statistics will tell you what the uptime of your database instance is, how long it’s been monitored, what its uptime is in percentage, and for how long it was down. 

It will also show you the periods of time when the database was up and running like a bee , and when the SQL database got shut down. That might help you to observe some patterns in downtime. For example, did your database go down straight after a certain feature was introduced into your web application? Did your database go down after a certain query was running? etc. 

dbWatch will also tell you how long your database was monitored for, how long was it down too. 

While this database monitoring job is certainly not everything that dbWatch can offer (dbWatch can also monitor SQL Server, Oracle, Sybase, PostgreSQL, and MariaDB), it is particularly useful if you want to monitor the uptime of your MySQL instances. 

 

 

Summary

While the monitoring of uptime is certainly not a new concept, performing tasks that help you monitor your database instances can be particularly challenging and time-consuming. There are tools that help us monitor the uptime of our web applications and whatnot, but what is also important to keep in mind is the uptime of databases: the uptime of databases (MySQL in this case), can be taken care of when tools are developed by dbWatch are in use. 

If you have any questions or doubts, you can also find a lot of useful information in the dbWatch wiki: if you have any further questions, keep in mind that you can always reach out to the team and ask for help – they will be glad to answer all kinds of queries. 

 

-------------------

Other blogs:

Job Statuses in dbWatch - the How, Why and When

Managing Database Farms vs. Managing Single Database Instances with dbWatch

 

-------------------

About the Author:

Lukas Vileikis is an ethical hacker and a frequent conference speaker.

Since 2014, Lukas has found and responsibly disclosed security flaws in some of the most visited websites in Lithuania.

He runs one of the biggest & fastest data breach search engines in the world - BreachDirectory.com, frequently speaks at conferences and blogs in multiple places including his blog over at lukasvileikis.com.

 

Topics: database dashboard, database operations, sql server monitoring, sql monitoring tools, database monitoring, sqlmonitor, sqlperformance, sqlmanager, database farm, farmmanagement