Ephemeral Environments: A Quick Overview
December 21, 2024

Ephemeral Environments: A Quick Overview

Staging environments are the new industry standard for testing and previewing features before they go live. They are typically configured on a per pull request basis so each feature can be tested individually before being merged.

use transient environment Testing capabilities is the shortcut to a great developer experience: Engineers are most capable when their test environment reflects their current deployment workflow (read: no manual overhead). Replacing them with traditional static environments can help teams deliver faster, test more frequently, review more thoroughly, and most importantly Trust their deployment.


Temporary environment architecture

Ephemeral environments are at the sweet spot between cost efficiency and production parity. There are some architectural patterns that can help you maximize its value:

  1. They are completely isolated from the rest of your infrastructure

    Staging environments should not share dependencies or services with each other or any other environment. This isolates their blast radius in the event of bugs or regressions.

  2. They are end-to-end, near-production copies of your application

    What’s the best way to test your functionality? beside real Services, APIs, etc. Your pre-production environment is overwhelmingly They’re even more valuable if they help you move your true post-testing to the left.

  3. They support GitOps

    Many environment bottlenecks occur on the human side: for example, do you need someone to manually create/push your code to a test environment? Staging environments automate repetitive tasks: they should be built using GitOps and synchronized with the SSOT repository so that they always reflect your latest code changes.

  4. their lifespan is short

    Treating your environment like cattle is a common pattern, and for good reason: You don’t need Your test environments can run 24/7, and they don’t need to have static infrastructure. Keeping environments ephemeral reduces cloud costs and enables you to quickly provision/deprovision them when needed.

Uber maintains an internal temporary environment system called slate (Ephemeral application testing environment). They use it to test new features and their production dependencies.


Typical staging environment workflow

If done correctly, a staging environment can shave days off your deployment preparation time. On-demand means more team members can work/review asynchronously, especially without any DevOps/platform team intervention.

The workflow might look like this:

  1. A developer completes a feature and opens a PR
  2. Automatically configure staging environments to reflect developers’ latest code changes
  3. CI pipeline to run unit, integration and E2E tests against the new environment
  4. If all tests pass, the developer will interact with the environment and ensure that the feature works as expected. Environment slows down after inactivity
  5. They cycle through code reviews, design reviews, product reviews, etc.
  6. Reviewers launch the environment and approve or request changes at their convenience
  7. Developer pushes new commit (if applicable), environment syncs and executes CI job again
  8. Once the feature is ready, the developer merges the branch and the environment is brought down

The entire cycle can take anywhere from a few hours to a few days, depending on the complexity of the feature. Test environment bottlenecks consume a lot of time, so using staging models can instantly speed up development by more than 40%.


Impact of DORA and DevEx

The ephemeral environment has positive ripple effects on an engineer’s life, but beyond the obvious (ticket velocity, lead times, etc.), how can you Quantify Their value?


dora indicator

Dora (DevOps Research and Assessment) metrics are a practical way to measure feature throughput and stability. They help teams measure their performance in a standard, straightforward way and set metric goals to drive continuous improvement.


Source: Google Cloud

The transient environment has a direct impact on DORA’s four key indicators. At its core, DORA is about guiding teams toward good deployment processes (continuous delivery, flexible infrastructure, scalable architecture, etc.) so that they can improve the quality of their processes (and therefore their software).


Developer experience (DevEx)

Developers work most effectively when they are supported through tools and processes to do their best work. Investing in DevEx not only improves developers’ quality of life, but also has a positive impact on productivity and software quality.

The biggest obstacles to DevEx are tasks that disrupt the process. If developers lose access to the environment shortly after pushing code, they will be forced to context switch and lose momentum. Staging environments ensure developers have the infrastructure they need to test and preview their code in the field so they can continue development the same day instead of a week later.

Teams can assess their DevEx Quotient using the following methods: Development execution framework or spatial index.


TLDR: Transient environments are priceless

In short, ephemeral environments benefit the engineering process in almost every way possible. There’s a reason they’re rapidly gaining popularity: they have a huge ROI relative to cost/effort.

A quick recap:

  • they are cost effective

    Since they are short-lived, you only pay for what you use, so you can have as many environments as you need

  • they promote cooperation

    Teams can review the context of each feature, view and interact with code changes before deployment

  • They improve the quality of life of developers

    On-demand infrastructure means developers can maintain processes and test on-site rather than waiting for manual DevOps intervention

  • They enable teams to deliver faster

    Staging environments eliminate environment bottlenecks, meaning deployment delivery times are significantly reduced

Looking for a hosted staging environment? try shipyard. Your DORA indicator will thank you 🙂

2024-12-20 23:37:45

Leave a Reply

Your email address will not be published. Required fields are marked *