Making Facebook self-healing: Automating proactive rack maintenance

Visit the post for more.

Romain Komorn
9 min readintermediate
--
View Original

Overview

The article discusses Facebook's proactive approach to maintaining its production infrastructure through automation, specifically focusing on the Facebook Auto Remediation (FBAR) service and its enhancement, Aggregate Maintenance Handlers. It highlights the importance of minimizing service disruptions while managing hardware and software failures effectively.

What You'll Learn

1

How to automate rack maintenance using Aggregate Maintenance Handlers

2

Why preflight checks are crucial for safe maintenance operations

3

When to use manual intervention in automated processes

Prerequisites & Requirements

  • Understanding of server maintenance and infrastructure management
  • Familiarity with automation tools like Dapper(optional)

Key Questions Answered

How does Facebook automate proactive rack maintenance?
Facebook automates proactive rack maintenance through the Facebook Auto Remediation (FBAR) service, which detects software and hardware failures and executes code to manage these issues without human intervention. This system minimizes service disruptions by allowing for automated repairs and maintenance scheduling.
What are Aggregate Maintenance Handlers and how do they work?
Aggregate Maintenance Handlers are an enhancement to FBAR that allow for the bulk disabling and enabling of servers during maintenance. They provide engineers with context on the maintenance work and help manage multiple servers simultaneously, reducing the risk of service disruption.
What information is needed to assess maintenance impact?
To assess maintenance impact, the Aggregate Maintenance Handler requires four pieces of information: the scope of affected servers, the type of maintenance (network or power interruption), the start time, and the expected duration of the maintenance. This helps in making informed decisions about the automation process.
What happens when automation fails during maintenance?
When automation fails, the maintenance process notifies the service owner to manually confirm that hosts have been properly disabled before allowing maintenance to continue. This ensures that safety protocols are followed and service integrity is maintained.

Technologies & Tools

Automation
Facebook Auto Remediation
Used for detecting and addressing software and hardware failures automatically.
Scheduling Tool
Dapper
Facilitates coordination between automated and manual maintenance processes.

Key Actionable Insights

1
Implement Aggregate Maintenance Handlers to streamline server maintenance processes.
Using Aggregate Maintenance Handlers allows for bulk operations on multiple servers, reducing the time and risk associated with manual maintenance. This is particularly useful in large-scale environments like Facebook's.
2
Conduct thorough preflight checks before scheduling maintenance.
Preflight checks ensure that sufficient capacity remains available during maintenance, preventing service interruptions. This proactive measure is essential for maintaining operational reliability.
3
Utilize Dapper for coordinating automated and manual maintenance tasks.
Dapper provides a structured workflow for scheduling maintenance, ensuring that all teams are informed and that manual interventions are effectively managed when automation is not feasible.

Common Pitfalls

1
Relying solely on serial disable logic can lead to capacity issues during maintenance.
Disabling hosts one at a time may block maintenance work if capacity runs out, necessitating human intervention. To avoid this, bulk operations should be employed.
2
Using parallel disable logic can introduce race conditions.
Executing disable commands in parallel may cause services to run out of capacity faster, leading to potential service disruptions. A more controlled approach is needed to manage these operations safely.

Related Concepts

Server Maintenance Best Practices
Automation In Infrastructure Management
Impact Assessment In Maintenance Scheduling