DEV Community

Cover image for From Bi-weekly to Every 5 Minutes: Modern Continuous Deployment Strategies
Alexander Uspenskiy
Alexander Uspenskiy

Posted on

From Bi-weekly to Every 5 Minutes: Modern Continuous Deployment Strategies

If your release cadence is bi-weekly or so and you're thinking about decreasing time to market, here are some modern Continuous Deployment strategies

Prerequisites

Your project should have a fast and reliable CI/CD pipeline and sufficient automated test coverage (for enterprise software the typical level is 70-80% code coverage, with critical systems requiring 85%+).
Without this foundation, you can't achieve the maximum gain from a modern release strategy

CD Strategies

1. Feature Flags (Feature Toggles)

Feature flags let you dramatically speed up the release cycle. You can stop guessing and start making data-driven decisions and run experiments. If your new feature isn't working, you have a way to quickly turn it off in production without any hotfix releases and delays. Of course, you should build an approval process around this activity, but this way of releasing gives you perfect control over new (and old) functionality in production.

2. Trunk-Based Development

Key elements are: short-lived feature branches (< 1-2 days), frequent merges to main/trunk by developers without bureaucratic procedures (multiple times per day). Remember that your code should be covered by automated testing. This strategy works well with feature flags, which allow you to deploy partially completed work and quickly solve issues in production.

3. A/B Testing

This strategy opens the door for experiments and data gathering to better understand what your customers really need. You can use A/B testing for user segments (young audience, frequent buyers, etc.) to collect all the metrics needed to choose the best implementation.

These strategies can be combined with progressive delivery patterns like canary releases (release to small % of users first, then increase exposure), blue-green deployment (two environments with old and new versions, switch to old if any critical issues are found), ring-based deployment (inner ring with internal users, middle ring with beta testers, outer ring for all users) and other patterns.
These strategies work well with modern tooling like IaaC (Infrastructure as Code), automated smoke tests post-deployment, chaos/monkey testing, and others.

Happy releasing!

Top comments (0)