What strategies are used for release or deployment? #


Docker Advantages

  • Release: The process of planning, scheduling, and controlling the deployment of new software versions while minimizing risk and ensuring application stability

  • Release Strategies:

    • Recreate
    • Canary
    • A/B Testing
    • Rolling
    • Rolling + Additional Batch
    • Blue Green
    • Shadow

Recreate - deployment strategy #


Docker Advantages

  • Approach: Terminate Version 1 completely, then roll out Version 2.
  • App Down: The application is unavailable (down) during the release.
  • Rollback: Requires redeployment, leading to additional downtime.
  • Cost & Speed: It’s fast and cost-effective but disruptive.
  • Backward Compatibility: Avoids the need for maintaining data or application compatibility.

Real-Time Scenario:

  • During a major holiday sale, an online retailer uses the Recreate strategy to deploy a critical update, resulting in a brief downtime that temporarily halts all transactions and frustrates customers.

Canary - deployment strategy #


Docker Advantages

  • Approach: Deploy Version 2 to a small subset of instances first; if tests succeed, roll out to all.
  • Zero Downtime: Traffic can keep flowing while a portion of instances are updated.
  • No Extra Infrastructure: Reuses the same pool of servers; no parallel environment needed.
  • Minimized Impact: Only a small percentage of users face any issues if something goes wrong.
  • Backward Compatibility: Requires both versions to work seamlessly with existing data.

Real-Time Scenario:

  • A streaming service deploys a new recommendation algorithm to 5% of users first. When no significant issues are detected, the update is gradually expanded to the entire user base.

A/B Testing - deployment strategy #


Docker Advantages

  • Approach: Release Version 2 to a subset of users, and keep Version 1 for others.
  • Testing: Assess if users prefer the new version; if not, revert easily to Version 1.
  • Key Benefit: Gives the ability to gather real-time feedback on the new feature.

Real-Time Scenario:

  • A social media platform releases a redesigned user interface to 10% of its users to gather feedback and analyze engagement metrics before a full-scale rollout.

Rolling - deployment strategy #


Docker Advantages

  • Approach: Gradually roll out Version 2 to a certain percentage of instances (e.g., 25%), then keep increasing.
  • Zero Downtime: At any point, some instances still run Version 1 while others move to Version 2.
  • No Extra Infrastructure: Does not typically require parallel environments.
  • Automation: Often needs tools to handle partial updates and monitoring.
  • Backward Compatibility: Data and application layers must coexist during transition.

Real-Time Scenario:

  • A financial application updates its transaction processing service incrementally across multiple servers to ensure continuous availability and monitor performance before full deployment.

Rolling + Additional Batch - deployment strategy #


Docker Advantages

  • Approach: Create additional new instances running Version 2 in batches, then gradually replace old ones.
  • Similar to Rolling: Follows the same pattern but spawns extra capacity for each batch.
  • Extra Infrastructure: Requires a bit more hardware to run new instances while old ones are still live.
  • Zero Reduction: Ensures no drop in the number of instances serving users.

Real-Time Scenario:

  • An online banking system temporarily increases server capacity to deploy a new security feature in batches, ensuring all customer transactions remain uninterrupted during the update process.

Blue Green - deployment strategy #


Docker Advantages

  • Approach: Keep Version 1 live while creating a parallel environment for Version 2, then switch traffic over.
  • Instant & Zero Downtime: Users see almost no interruption when you redirect them to Version 2.
  • Infrastructure: Requires additional servers for the parallel (Green) environment.
  • Cost: More expensive due to maintaining two full environments at once.
  • Backward Compatibility: Ensures data consistency across both environments before switch.

Real-Time Scenario:

  • A healthcare application uses the Blue Green strategy to deploy a new patient management system by running it alongside the existing version, allowing seamless traffic switch without disrupting patient access.

Shadow - deployment strategy #


Docker Advantages

  • Approach: Version 1 remains live; create a parallel Version 2 environment; mirror real traffic to both.
  • Zero Production Impact: Safely test Version 2 with production-like traffic before going live.
  • Complex & Expensive: Needs significant extra infrastructure and setup.
  • Final Switch: Once tests validate Version 2, all traffic migrates, and Version 1 is removed.

Real-Time Scenario:

  • An e-commerce platform deploys a new search algorithm in shadow mode, processing real user queries alongside the current system to ensure accuracy and performance before fully switching over.