Managing scheduled downtime with flexible Maintenance Windows

May 14, 2024 - 5 min read
Managing scheduled downtime with flexible Maintenance Windows

As the first French and European ISO 27001-certified Platform-as-a-Service provider, we owe you a reliable, secure platform that evolves in response to potential threats and supports you as you grow.

This is why the analogy of a gardener resonates with us. Just like a gardener maintains the overall harmony and flourishing of their garden by regularly watering plants, trimming bushes, and weeding, we too undertake regular, proactive maintenance of our system to keep it resilient and thriving.

Scalingo now incorporates maintenance windows for all your databases. This new feature enables us to make regular changes at all levels of our architecture while ensuring appropriate communication and minimizing disruptions to your applications. Each maintenance operation will be executed at a time that suits you best, minimizing impact on your business operations.

If it ain’t broke, don’t fix it ?

This old adage no longer makes sense to us! As the complexity of systems and infrastructures increases day by day, it's easy to feel overwhelmed by the multitude of dependencies that make up modern software architectures.

The XZ Utils backdoor serves as a perfect illustration that a small, innocuous software component can represent a significant security risk:

“Dependency” par xkcd.

Maintaining and evolving a sophisticated system requires a wide range of operations - varying in scale - to update and optimize the functioning of the technical components that support your applications. This may involve updating the host operating system to address vulnerabilities, adjusting network components to better isolate your resources, or globally balancing server loads to deliver predictable and consistent performance.

A New Approach

Up until now, database maintenance at Scalingo was managed as infrastructure as code (IaC). This involved manual processes, from defining the technical aspects of maintenance to communicating with affected clients.

The maintenance activities were notified in advance but were enforced without any flexibility for our clients. This lack of flexibility was also felt on our end. Unable to provide differentiated and specific treatment for each of your applications and databases, we had to minimize the impact for the majority and request our teams to execute them overnight.

Similar to our gardening analogy, we are now moving away from traditional IT paradigms towards a new approach we like to call "Embracing Continuous Change"!

We wanted an approach that allows us to make regular updates across our entire architecture while ensuring smooth communication and minimizing disruptions to your applications.

To tackle this challenge, we decided to implement an automated solution for managing database maintenance operations. By leveraging Database Maintenance Windows, this system executes maintenance operations at times chosen by you! This ensures minimal impact on your application and facilitates seamless change management and ongoing improvement of our platform.

Choosing Your Maintenance Window

From now on, any operation involving a database, whether it's an architecture or software change, will occur during the maintenance window you define.

Each of your databases now has a default Maintenance Window set for a specific day of the week, between 9:00 PM and 5:00 AM UTC. If this timeframe doesn't align with your business needs, you have the flexibility to adjust it as needed.

With our command-line interface (version 1.31.0 and later) and soon directly within our dashboard, you can select the 8-hour window that best suits your business operations.

Does this mean that my database will be unavailable for 8 hours?

While the designated Maintenance Window spans 8 hours, it's important to note that the actual downtime for your database will likely be shorter.

The actual duration of maintenance depends on various factors such as the nature of the operation, the size of your database and your selected plan.

Our team works diligently to minimize downtime and ensure the smooth operation of your databases.

Decoding Maintenance Procedures

When a maintenance operation is scheduled, Scalingo operators notify the owner of the relevant app, as well as any collaborators involved.

Here are the different steps that make up a maintenance window:

Definition: A Scalingo operator defines a new maintenance operation. This object allows us to attach all the important elements for its successful execution (procedure, rollback plan, integrity testing, etc.).

Selection: Based on specific criteria for each maintenance operation, eligible databases are assigned to it.

Scheduling: Every hour, our system schedules operations to be executed 24 hours later. If this corresponds to the maintenance window of an eligible resource, you will receive a notification confirming its scheduling. From this point onward, it will not be possible to modify or cancel the operation without contacting our support team.

Execution: When the operation begins, you will receive a new notification. It will be important to refrain from making any changes to your database during this time.

Operation Completion: A new notification will inform you when the operation has concluded. Nominal service has been restored, and your database is once again fully operational.

If there is not enough time remaining in the selected maintenance window, we may determine that the operation cannot proceed. In such cases, it will automatically be rescheduled for the next maintenance window, typically the following week.

Sharing the information with your team

By default the app owner and any collaborators will receive email notifications before a maintenance operation is execution.

To achieve this, we have incorporated three new triggers into our notifier system. We have also automatically activated them for the default notifier associated with each of your applications.

Please check if it is still active or configure a specific notifier for maintenance operations.

Three new triggers are now dedicated to maintenance:

  • database_maintenance_planned : Database maintenance has been scheduled.
  • database_maintenance_started: Database maintenance has started.
  • database_maintenance_completed: Database maintenance has ended.

Upcoming Maintenance Operations

We have several database maintenance operations in the pipeline for you!

In the near future, we’ll offer you the option to update the authentication method used by your PostgreSQL databases (from MD5 to SCRAM) to enhance security and prepare for a future migration to PostgreSQL 15!

Following that, we’ll automate updates for your databases to ensure the application of the latest patches and manage end-of-life for obsolete versions. As part of the announced plan, automatic update operations for your MySQL 5.7 instances to MySQL 8 LTS will begin in early summer.

Additionally, maintenance operations will be conducted to migrate database components between our servers to free up underlying resources and ensure that your databases run on the latest and most optimized systems.

What about emergencies?

In rare cases, urgent and unforeseen operations may arise. We all remember vulnerabilities like OpenSSL, Log4Shell, or Heartbleed, which demanded a swift and coordinated response from the entire industry.

During such events, as well as infrastructure incidents, operations may need to be carried out outside of scheduled maintenance windows. Rest assured that the availability and integrity of your data are our top priorities. We will always do our utmost to keep you informed in the most transparent and efficient manner possible.

Building the future step by step

We are currently making significant changes to strengthen and expand the capabilities of the Scalingo platform. By embracing change and giving you more control over its impact on your applications, we aim to maintain your trust while collaboratively shaping the future of Scalingo.

Share the article
Benjamin Ach
Benjamin Ach
Benjamin is Product Manager at Scalingo: one foot in tech, one foot in business and one foot in user experience. His goal? To make a positive impact on your software development habits by using Scalingo PaaS!

Try Scalingo for free

30-day free trial / No credit card required / Hosted in Europe