Reader small image

You're reading from  Building Micro Frontends with React 18

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781804610961
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Vinci J Rufus
Vinci J Rufus
author image
Vinci J Rufus

Vinci Rufus is a VP for technology at Publicis Sapient. He has spent over 25 years building web applications using various technologies. He has been focused on building micro frontends for about half a decade and has successfully built and managed micro frontend-based applications for a few large clients. He was formerly a Google Developer Expert and has had the opportunity to speak at numerous conferences on modern frontend and cloud-native technologies.
Read more about Vinci J Rufus

Right arrow

Managing Microfrontends in Production

Being able to develop and test web applications on your local computer is great; however, deploying them them to production, maintaining them, and releasing new features while your applications are being visited by hundreds and thousands of visitors takes your software development skills to the next level. This chapter will cover some of the key concepts around deploying and maintaining your microfrontends in production.

In this chapter, we will cover the following topics:

  • Branching strategies
  • Versioning
  • Rollback strategies
  • Feature toggles

By the end of this chapter, you will have taken the first steps toward reliably maintaining your microfrontend applications in production.

Foundational components for a strong software delivery model

When it comes to deploying and maintaining applications in production, I recommend using DevOps Research and Assessment’s (DORA’s) software delivery maturity model to help prioritize areas to focus on and aspects of your production deployment processes you should optimize.

Important note

The software delivery maturity model talks about four key areas—namely, Deployment frequency, Lead time for changes, Time to restore service, and Change failure rate, and these are categorized as Elite, High, Medium, and Low. You can read more about this in detail here in the State of DevOps 2021 report: https://dora.dev/publications/pdf/state-of-devops-2021.pdf. You can also register and view the rest of the reports at https://dora.dev/publications/ and https://cloud.google.com/devops/state-of-devops.

We will look at a couple of key components that help you create the right foundation to ensure you are able...

Rolling back a micro app

A rollback strategy is a key component to managing any production software. This impacts the Time to restore service metric.

Rollback strategies for microfrontends center on the ability to revert a specific micro app or the entire system to a previous stable state when issues arise during or post-deployment. Thanks to the independence of microfrontends, a rollback doesn’t necessarily affect the entire application but can be targeted to the problematic component, reducing overall system disruption.

The simplest rollback strategy involves utilizing version control systems such as Git along with CI/CD pipelines. In this setup, each microfrontend has specific tagged releases, which are stored and can be redeployed if required. For instance, if the current version of a microfrontend is catalog-1.2.3 and an issue is detected, you can quickly revert to the previous stable version, catalog-1.2.2, by triggering the corresponding deployment in your CI/CD...

Deploying micro apps with feature toggles

Feature toggling, also known as feature flagging, is a powerful technique that allows individual features to be turned on or off at runtime without requiring a redeployment. This is particularly useful in a microfrontend architecture, as it enables the independent release and control of micro apps across multiple micro applications.

With feature toggling, teams can deploy new features to production but have them “hidden” behind a toggle until they’re ready to be released. This allows for extensive testing in the live environment and enables progressive delivery techniques such as canary releases or A/B testing. If any issues arise with the new feature, it can be quickly “switched off” via the feature toggle, effectively mitigating the impact without requiring a full rollback or redeployment.

Unleash (https://www.getunleash.io/) is a popular open source tool for feature toggles.

Feature toggles can...

Summary

As we conclude this chapter, let us quickly summarize what we’ve learned so far. We learned about DORA’s software delivery performance metrics: Deployment frequency, Lead time for changes, Time to restore service, and Change failure rate. We then had a look at some of the foundational elements that teams need to focus on to ensure they are set up for success.

We learned about branching strategies and that GitHub Flow is the preferred branching strategy. We also learned about the nuances of workflows when software is being built versus when it’s deployed.

We learned about the right way to version our micro apps. We also learned about the importance of rollback strategies and how microfrontends help minimize the blast radius. And finally, we learned about feature toggles and how we can gradually release new micro apps into production via feature toggles and, more importantly, if there are any problems.

In the next chapter, we will look at some common...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Building Micro Frontends with React 18
Published in: Oct 2023Publisher: PacktISBN-13: 9781804610961
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime

Author (1)

author image
Vinci J Rufus

Vinci Rufus is a VP for technology at Publicis Sapient. He has spent over 25 years building web applications using various technologies. He has been focused on building micro frontends for about half a decade and has successfully built and managed micro frontend-based applications for a few large clients. He was formerly a Google Developer Expert and has had the opportunity to speak at numerous conferences on modern frontend and cloud-native technologies.
Read more about Vinci J Rufus