Version Log

Date

Author

Version

Change Description

04/13/2025

Srikanth Mamillapalli

0.1

Initial Draft


 

Table of Contents

1      Deployment strategies  3

 


 

1        Deployment strategies

 

#

Strategy

Downtime

Rollback Speed

Extra Infrastructure

Complexity

Common Usage

1

Recreate Deployment

High

Medium

No

Low

Small/Internal Apps

2

Rolling Deployment

None/Minimal

Medium

No

Medium

Kubernetes Default

3

Blue-Green Deployment

None

Very Fast

Yes

Medium

Banking, Payments

4

Canary Deployment

None

Fast

Partial

High

Large Scale Systems

5

A/B Testing Deployment

None

Fast

Partial

High

Product Experiments

6

Shadow Deployment

None

Fast

Yes

High

Performance Testing

7

Feature Toggle (Feature Flag)

None

Instant

No

Medium

Continuous Delivery

8

Ring-Based Deployment

None

Fast

No

High

Enterprise Applications

9

Red-Black Deployment

None

Very Fast

Yes

Medium

Similar to Blue-Green

10

Progressive Delivery

None

Fast

Partial

High

Cloud-Native Systems

 

Quick Reference Table

 

1.     Recreate Deployment

 

Category

Details

Strategy Name

Recreate Deployment

How It Works

1. Stop Version 12. Deploy Version 23. Start Version 2

Deployment Flow

v1 Running → Application Down → v2 Running

Downtime

Yes (Application is unavailable during deployment)

Rollback Speed

Medium (Requires redeployment of previous version)

Infrastructure Requirement

No additional infrastructure required

Complexity

Low

Advantages

• Very simple• Easy to implement• No additional resources required

Disadvantages

• Downtime occurs during deployment• Risky for production systems• Poor user experience during upgrades

Kubernetes Configuration

yaml strategy: type: Recreate

Best For

• Internal tools• Non-critical applications• Development/Test environments

Not Recommended For

• Banking applications• Payment systems• Customer-facing production applications

Spring Boot Example

Stop existing Spring Boot pod/container, deploy new version, then start new pod/container

Real-Time Use Case

Internal Admin Portal, Reporting Dashboard, QA/Test Environment

Production Suitability

Low

Zero Downtime Support

No

 

Visual Representation

Before Deployment

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

Spring Boot v1

     |

   Users

 

Deployment Starts

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

Stop v1

     |

Application Down

 

Deployment Completes

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

Start v2

     |

   Users

 

Kubernetes YAML Example

 

apiVersion: apps/v1

kind: Deployment

metadata:

  name: user-service

 

spec:

  strategy:

    type: Recreate

 

  replicas: 1

 

  template:

    spec:

      containers:

      - name: user-service

        image: user-service:v2

 

2.     Blue-Green Deployment

Category

Details

Strategy Name

Blue-Green Deployment

How It Works

Maintain two identical environments and switch traffic

Deployment Flow

Blue(v1) Active → Deploy Green(v2) → Test → Switch Traffic

Downtime

No

Rollback Speed

Very Fast

Infrastructure Requirement

Yes (Double Infrastructure)

Complexity

Medium

Advantages

• Instant rollback• Near-zero downtime• Safer releases

Disadvantages

• Higher cost• Database compatibility challenges

Kubernetes Configuration

Usually implemented using Services/Ingress switching

Best For

Banking, Payments, Authentication Services

Not Recommended For

Budget-sensitive projects

Production Suitability

Very High

Zero Downtime Support

Yes

 

Two environments exist simultaneously. Traffic is switched to the new version after validation, enabling immediate rollback.

 

3.     Canary Deployment

 

Category

Details

Strategy Name

Canary Deployment

How It Works

Release new version to a small subset of users

Deployment Flow

10% → 25% → 50% → 75% → 100%

Downtime

No

Rollback Speed

Fast

Infrastructure Requirement

Partial

Complexity

High

Advantages

• Reduced risk• Real-user validation• Gradual rollout

Disadvantages

• Requires advanced monitoring• Traffic routing complexity

Kubernetes Tools

Istio, Argo Rollouts, OpenShift Routes

Best For

High-traffic systems

Not Recommended For

Small teams lacking monitoring tools

Production Suitability

Very High

Zero Downtime Support

Yes

 

Canary deployments expose a small percentage of users to the new version before wider rollout.

 

4.     A/B Testing Deployment

 

Category

Details

Strategy Name

A/B Testing

How It Works

Different users receive different versions

Deployment Flow

Group A → Version AGroup B → Version B

Downtime

No

Rollback Speed

Fast

Infrastructure Requirement

Partial

Complexity

High

Advantages

• Business validation• User behavior comparison

Disadvantages

• Analytics required• Complex routing

Best For

UI/UX Experiments

Not Recommended For

Backend-only services

Production Suitability

High

Zero Downtime Support

Yes

 

A/B testing helps compare user engagement and business metrics across multiple versions.

 

5.     Shadow Deployment

 

Category

Details

Strategy Name

Shadow Deployment

How It Works

Mirror production traffic to new version

Deployment Flow

User → v1 ResponseTraffic Copy → v2

Downtime

No

Rollback Speed

Fast

Infrastructure Requirement

Yes

Complexity

High

Advantages

• Real traffic testing• No customer impact

Disadvantages

• Additional infrastructure cost• Increased monitoring needs

Tools

Istio, Envoy

Best For

Performance validation

Not Recommended For

Cost-sensitive projects

Production Suitability

High

Zero Downtime Support

Yes

 

Shadow deployment duplicates production traffic to the new version without exposing users to it.

 

6.     Feature Toggle (Feature Flag)

Category

Details

Strategy Name

Feature Toggle / Feature Flag

How It Works

Deploy code with feature disabled

Deployment Flow

Deploy → Feature OFF → Enable Gradually

Downtime

No

Rollback Speed

Instant

Infrastructure Requirement

No

Complexity

Medium

Advantages

• Instant enable/disable• No redeployment needed

Disadvantages

• Code complexity• Technical debt if not cleaned up

Tools

LaunchDarkly, Unleash

Best For

Continuous delivery

Not Recommended For

Long-term permanent features

Production Suitability

Very High

Zero Downtime Support

Yes

 

Features are deployed but hidden behind flags, allowing controlled activation.

 

 

 

7.     Ring-Based Deployment

 

Category

Details

Strategy Name

Ring-Based Deployment

How It Works

Rollout in stages to predefined user groups

Deployment Flow

Ring0 → Ring1 → Ring2 → Ring3

Downtime

No

Rollback Speed

Fast

Infrastructure Requirement

No

Complexity

High

Advantages

• Controlled rollout• Early issue detection

Disadvantages

• Operational complexity

Best For

Enterprise SaaS Products

Not Recommended For

Small projects

Production Suitability

High

Zero Downtime Support

Yes

 

Ring

Users

Ring 0

Developers

Ring 1

Internal Employees

Ring 2

Beta Customers

Ring 3

All Customers

 

8.     Red-Black Deployment

Category

Details

Strategy Name

Red-Black Deployment

How It Works

Same concept as Blue-Green using Red and Black names

Deployment Flow

Red(v1) Active → Black(v2) → Traffic Switch

Downtime

No

Rollback Speed

Very Fast

Infrastructure Requirement

Yes

Complexity

Medium

Advantages

• Immediate rollback• Zero downtime

Disadvantages

• Double infrastructure cost

Best For

Mission-critical applications

Production Suitability

Very High

Zero Downtime Support

Yes

 

9.     Progressive Delivery

Category

Details

Strategy Name

Progressive Delivery

How It Works

Combination of Canary + Feature Flags + Monitoring

Deployment Flow

1% → 5% → 10% → 50% → 100%

Downtime

No

Rollback Speed

Automatic/Fast

Infrastructure Requirement

Partial

Complexity

Very High

Advantages

• Safest deployment model• Automated rollback

Disadvantages

• Requires mature DevOps ecosystem

Tools

Argo Rollouts, Flagger, Istio

Best For

Cloud-native microservices

Production Suitability

Very High

Zero Downtime Support

Yes

 

Progressive delivery combines traffic control, feature flags, monitoring, and automated rollback to safely release software.

 

10.  Final Comparison Table

 

Strategy

Downtime

Rollback

 

Cost

Complexity

Enterprise Usage

Recreate

High

Medium

 

Low

Low

Low

Rolling

None

Medium

 

Low

Medium

Very Common

Blue-Green

None

Instant

 

High

Medium

Banking/Payments

Canary

None

Fast

 

Medium

High

Large Scale Apps

A/B Testing

None

Fast

 

Medium

High

Product Teams

Shadow

None

Fast

 

High

High

Performance Testing

Feature Flags

None

Instant

 

Low

Medium

Continuous Delivery

Ring-Based

None

Fast

 

Medium

High

Enterprise SaaS

Red-Black

None

Instant

 

High

Medium

Mission Critical

Progressive Delivery

None

Automatic

 

Medium

Very High

Modern Cloud-Native

 

 

 

 

 

 

1. Recreate Deployment

How It Works

Stop Version 1
      ↓
Deploy Version 2
      ↓
Start Version 2

Example

v1 Running
     ↓
Application Down
     ↓
v2 Running

Advantages

Ø  Very simple

Ø  Easy to implement

Ø  No additional resources

Disadvantages

Ø  Downtime occurs

Ø  Risky for production

Kubernetes

strategy:
  type: Recreate

Best For


2. Rolling Deployment

How It Works

Replace instances gradually.

Before
v1 v1 v1 v1

Step1
v2 v1 v1 v1

Step2
v2 v2 v1 v1

Step3
v2 v2 v2 v1

Final
v2 v2 v2 v2

Advantages

Ø  No downtime

Ø  Resource efficient

Disadvantages

Ø  Mixed versions coexist

Ø  Rollback takes time

Kubernetes

strategy:
  type: RollingUpdate

Best For

Ø  Most Spring Boot microservices

Ø  Standard Kubernetes deployments


3. Blue-Green Deployment

How It Works

Production
    |
  Blue (v1)

Deploy v2

  Green (v2)

Switch Traffic

Production
    |
 Green (v2)

Advantages

Ø  Near zero downtime

Ø  Instant rollback

Disadvantages

Ø  Double infrastructure cost

Ø  Database compatibility issues

Best For

Ø  Banking applications

Ø  Payment systems

Ø  Mission-critical services


4. Canary Deployment

How It Works

Release to a small percentage of users.

Users
  |
Load Balancer
  |
90% → v1
10% → v2

Gradually:

10%
25%
50%
75%
100%

Advantages

Ø  Lower risk

Ø  Real user validation

Disadvantages

Ø  Traffic management required

Ø  Monitoring is critical

Best For

Ø  High traffic systems

Ø  SaaS products


5. A/B Testing Deployment

How It Works

User Group A → Version A
User Group B → Version B

Example

India Users → New UI
US Users → Old UI

Advantages

Ø  Business validation

Ø  User behavior comparison

Disadvantages

Ø  Complex routing

Ø  Additional analytics required

Best For

Ø  Product teams and UI experimentation


6. Shadow Deployment

How It Works

Mirror production traffic.

Users
  |
Version 1
  |
Copy Traffic
  |
Version 2

Users only see Version 1 responses.

Advantages

Ø  Real production traffic testing

Ø  No user impact

Disadvantages

Ø  Higher infrastructure cost

Ø  More monitoring needed

Best For

Ø  Performance validation

Ø  Large enterprises


7. Feature Toggle (Feature Flag)

How It Works

Deploy Code
    |
Feature Disabled
    |
Enable for Users

Example

if(featureFlagEnabled){
    showNewCheckout();
}

Advantages

Ø  Instant enable/disable

Ø  No redeployment

Disadvantages

Ø  Additional code complexity

Ø  Technical debt if flags are not removed

Best For Agile teams and Continuous deployment


8. Ring-Based Deployment

Users are grouped into rings.

Ring 0 → Internal Team
Ring 1 → Beta Users
Ring 2 → 10% Users
Ring 3 → All Users

Advantages

Ø  Safe rollout

Ø  Early issue detection

Disadvantages

Ø  Complex management

Best For

Ø  Enterprise SaaS platforms


9. Red-Black Deployment

Practically same as Blue-Green.

Red Environment → Live
Black Environment → New

Switch Traffic

Advantages

Ø  Instant rollback

Ø  Zero downtime

·       Disadvantages

Ø  Double infrastructure

·       Best For

Ø  Large production systems


10. Progressive Delivery

Combination of:

Feature Flags
+
Canary
+
A/B Testing
+
Monitoring

Flow

1% Users
     ↓
10% Users
     ↓
50% Users
     ↓
100% Users

Automatic rollback if errors increase.

Advantages

Ø  Safest deployment model  and Highly automated

Ø  Disadvantages Requires mature DevOps practices

Best For

Ø  Cloud-native platforms

Ø  Microservices ecosystems

Real-Time Enterprise Examples

Company Type

Preferred Strategy

Banking

Blue-Green

Payment Gateway

Blue-Green + Canary

E-Commerce

Canary + Feature Flags

SaaS Product

Progressive Delivery

Internal HR Portal

Rolling Update

Enterprise Microservices

Rolling + Canary

High Traffic Consumer Apps

Canary

Mission Critical Applications

Blue-Green

What deployment strategy do you use in Kubernetes/OpenShift?

"For regular Spring Boot microservices, we use Rolling Updates. For critical services such as authentication, payments, or order processing, we use Blue-Green deployments to achieve zero downtime and instant rollback. For large-scale customer-facing applications, we combine Canary deployments with Feature Flags and automated monitoring to reduce release risk."