Stealthy shipping with atomic deploys

Pinterest Engineering
6 min readintermediate
--
View Original

Overview

The article discusses the atomic deploy system implemented at Pinterest to enhance the deployment process and improve user experience. It addresses the challenges of version mismatches during deployments and presents a solution that allows for seamless transitions between software versions without disrupting user interactions.

What You'll Learn

1

How to implement an atomic deploy system to minimize user disruption during software updates

2

Why managing version mismatches is crucial for user experience in web applications

3

When to use load balancers and versioning in deployment strategies

Prerequisites & Requirements

  • Understanding of deployment strategies and web application architecture
  • Familiarity with Varnish and ZooKeeper(optional)

Key Questions Answered

How does the atomic deploy system improve user experience during updates?
The atomic deploy system allows for seamless transitions between software versions, ensuring that users experience minimal disruption. By managing version mismatches effectively, it prevents the 'flip-flopping effect' where users would otherwise encounter multiple page reloads during a deployment.
What is the 'flip-flopping effect' in web deployments?
The 'flip-flopping effect' occurs when users are served different versions of a web application during a deployment, leading to unexpected page reloads. This happens especially in XHR-based interactions where parts of a page are updated independently, causing inconsistencies in user experience.
What architecture changes were made to support atomic deployments?
Pinterest upgraded its web front-end architecture to support serving two different versions of the application simultaneously. This involved using beefier servers capable of running multiple Python processes, allowing for a smooth transition between versions without forcing users to reload.
How does Varnish manage version control during deployments?
Varnish uses a series of barriers and server sets in ZooKeeper to determine which version of the application to serve. This coordination ensures that users remain on a consistent version throughout their session unless they manually reload the page.

Key Statistics & Figures

Deployment frequency
Increased ability to deploy more frequently throughout the day
The atomic deploy system allows for stealthier deployments, enabling more updates to be rolled out as business needs change.

Technologies & Tools

Backend
Varnish
Used for managing version control and routing requests to the appropriate application version.
Tools
Zookeeper
Facilitates coordination and management of server sets during deployments.

Key Actionable Insights

1
Implement an atomic deploy system to enhance user experience during software updates.
By ensuring that users are only served one version of the application at a time, you can minimize disruptions and improve overall satisfaction. This approach is particularly beneficial for applications with high user interaction.
2
Utilize load balancers to manage traffic between different application versions effectively.
Load balancers can help distribute user requests to the appropriate version of the application, ensuring that users have a consistent experience and reducing the likelihood of encountering version mismatches.
3
Monitor the impact of deployment strategies on user engagement metrics.
Understanding how different deployment methods affect user behavior can inform future strategies and help optimize the deployment process for better performance.

Common Pitfalls

1
Failing to manage version mismatches can lead to a poor user experience.
When users are served different versions of an application, it can result in unexpected behavior and frequent page reloads, which disrupts their interaction and satisfaction.

Related Concepts

Deployment Strategies
Version Control In Web Applications
User Experience Optimization