Best Deployment Strategies And The Strengths Of LaunchDarkly
09 Oct 2024 | Dezydery Czupryński
Best Deployment Strategies And The Strengths Of LaunchDarkly
Reliable, robust, and streamlined deployment strategies are crucial for organizations that want confidence and consistency from their software releases. A problematic release can be frustrating at best, drive users away to competitors, or impact business operations and sales.
Fortunately, there are several strategies to help mitigate deployment risk, as well as technologies like LaunchDarkly, Kubernetes, and Microsoft Azure App Service, to help ensure a successful launch every time.
In this article, gravity9 DevOps Engineer Dezydery Czupryński looks at some of the top options available and weighs them up against the most popular deployment strategies to help you pick the best tool and approach for the job.
Which Software Deployment Strategy Is Best?
The short answer is that “it depends.” Every use case is different, and what might work well for one organization could be almost impossible for another.
However, there are several popular deployment strategies, each with benefits and drawbacks.
Rolling Deployment
Rolling Deployment is a way of gradually updating instances of an application one by one, or in small batches, which reduces overall downtime but results in a longer time-to-completion overall.
Blue-Green Deployment
Creates two identical environments simultaneously. One is live (Blue), and the other is the new, updated release (Green). The updated Green environment is deployed and tested, and then active user traffic is switched from Blue to Green.
If there are any issues, users can quickly be redirected back to the fully functional Blue environment. This ensures an active environment at all times but may require additional resources to sustain both during the rollout process.
Canary Deployment
Canary deployment involves rolling out a new release to a small subset of users (the “canary group”). If this version works well, it can be rolled out to the entire user base. If it doesn’t, only a small number of users are impacted—but they are still affected—so it can be a risky choice for complex new deployments.
Feature Flags
Feature flags literally control the visibility of new features. A new application version is rolled out with new features hidden (or disabled). The deployment and release procedures sit separately, and configuration switches are used to activate features selectively.
This allows release teams to control which features are released to specific user groups, for example, allowing them to more easily conduct A/B testing or quickly turn off a feature or features if issues arise.
A / B Testing
While not a specific strategy for deploying software, A/B Testing is a helpful way of comparing which webpages, apps, features, products, etc., perform better across user groups against any number of different metrics.
It’s a popular testing method among product development, marketing, and UX/UI professionals to optimize user experience, increase usage or conversions, and make data-driven decisions.
Tools To Help Software Deployment
Just as it’s important to pick the right strategy for your software release, it’s equally important to have the right tools. Here’s an overview of some of the top solutions.
Microsoft Azure App Service
A fully managed platform-as-a-service (PaaS) offering that enables developers to build, deploy, and scale web applications, RESTful APIs, and mobile backends.
It supports multiple programming languages and frameworks, including .NET, Java, Node.js, Python, PHP, and Ruby, and provides built-in capabilities such as auto-scaling, load balancing, and security. It also supports running applications directly from container images, which makes it even more flexible.
Kubernetes
An open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. Originally developed by Google and now maintained by the Cloud Native Computing Foundation (CNCF), Kubernetes has become the de facto standard for container orchestration in cloud-native environments.
The basic way of running an application in Kubernetes is by using Deployments, which are a set of one or more pods (where a Pod is a set of at least one container). This makes it easy to scale up (and down) any number of application replicas. Deployment is exposed for network traffic using Service, where not healthy/ready pods are excluded from user requests.
LaunchDarkly
A feature management platform that provides feature flagging capabilities, enabling advanced deployment strategies with greater precision and reduced risk. While LaunchDarkly is not a traditional hosting solution, it plays a critical role in modern deployment processes by decoupling feature releases from code deployment. It integrates with various hosting infrastructures, enhancing deployment strategies by offering fine-grained control over feature rollouts.
Deployment does not equal release! While it’s easy to use deployment and release interchangeably in a feature-flagging or continuous-delivery environment, they have distinct meanings. It’s useful to understand the differences between them so you can understand the following patterns more clearly.
- Deployment is the process of putting executable code in its final destination. This might be on a server, a client, or any other place the code will run. Deployment is usually controlled by a technical team, a release manager, or an automated process.
- Release is the moment when end users get access to new code or features in order to serve a business objective.
LaunchDarkly’s feature flags provide key benefits during deployments:
- Fine-grained Control: LaunchDarkly allows for precise control over feature rollouts, enabling strategies like Canary and progressive deployments without requiring changes to the underlying infrastructure.
- Rapid Rollback: In the event of an issue, features can be turned off instantly via feature flags, providing a quick rollback mechanism. No infrastructure changes are needed, making the process rapid, uncomplicated, and safe.
- User Segmentation: Features can be targeted to specific user segments, allowing for advanced A/B testing and phased rollouts.
How Do Azure App Service, Kubernetes, and LaunchDarkly Compare?
With several deployment strategies, tools, and functions to review, it helps to have a visual guide. Here, we take a closer look at how Azure App Service, Kubernetes, and LaunchDarkly compare in performing Deployments, Rollbacks, and A/B Testing against the popular strategies mentioned above.
We measure success by the following criteria:
- Deploy a new application version with zero downtime.
- Provide a way to test a new application in the intended environment before enabling real user traffic.
- Make it possible to test new features on a limited set of users (where criteria can be easily defined).
- Support Rollbacks and A/B Testing.
Based on these measurements, tools can either meet the requirement, partially meet the requirement, or fail to meet the requirement (in other words, they do not support that functionality).
Here’s how these tools handle deployment:
Here, we look at how these tools handle rollback situations:
Finally, here’s how A/B Testing may be handled:
Picking The Best Deployment Strategy
This article has covered some of the most popular deployment strategies, key functionality you might look for, and deployment tools intended to support successful application rollouts.
Kubernetes and Microsoft Azure App Service are great ways to host and deploy applications, but they don’t provide all of the features for running a release described in our earlier requirements (which are incredibly popular among organizations of all sizes).
LaunchDarkly doesn’t replace traditional hosting infrastructure but significantly enhances deployment strategies by decoupling feature rollouts from infrastructure changes.
Furthermore, it complements hosting solutions by offering enhanced deployment capabilities through feature flagging, which is particularly powerful when combined with traditional hosting platforms and allows us to split deployment and release procedures. This allows development teams to implement Canary deployments, Blue/Green deployments, and Rolling deployments with greater precision and less risk.
Depending on the scope and complexity of your requirements, some deployment strategies and tools may be overkill, offering more complexity than is really needed, or, on the other hand, may be lacking in functionality that would be vital to your needs. This article provides a useful starting point, but it’s worth thoroughly investigating before picking a strategy. At gravity9, we’re experienced in consulting on these options, augmenting existing development teams, or taking the lead to ensure successful application deployments across small-scale up to enterprise requirements, and we would be happy to discuss your needs further.