Effectively and continuously deliver value through serverless

Our DevOps team had the opportunity to attend the Las Vegas event AWS re:Invent, where concepts such as serverless architectures, "The Lift and Shift approach", and best practices were discussed. The benefits of Lift and Shift approach when implementing serverless architectures are described throughout this post. During the transition process of serverless, we encountered some challenges and learned some lessons for future implementations. Read our article to know more about them!

Published: Jan. 17, 2023

At Stack Builders we value the professional growth of our team members. Our work is highly aligned with Agile principles, the DevOps culture, and the latest cloud technology trends. We are constantly looking for ways to improve and add more value to our clients through our work.

As consultants, the technical solutions we implement are focused mainly on the benefits that they will bring our clients in terms of maintenance effort, cost-effectiveness, reduced delivery time of features, and application reliability.

It is for the above reasons that our SRE (Site Reliability Engineering)/DevOps team attended the annual AWS re:Invent conference where they were able to gather valuable insights regarding the latest cloud trends, new AWS services, and best practices. These insights will help us to analyze new solutions and to better support our clients and development team by implementing infrastructure improvements.

Two of the rising trends discussed at the AWS re:Invent conferences are serverless architecture and the Lift and Shift approach. In order to provide the best cost-effective solution for clients, as of last year our team has been migrating cloud infrastructure to serverless architectures. The services and insights discussed at the conference will make further serverless transitions smoother and easier to implement.

The Lift and Shift Approach

One of the principles of Agile is the continuous delivery of software, and its practice with our clients has helped us deliver features in a series of incremental steps. This principle and its importance was highlighted multiple times during the AWS re:Invent event and is known as the Lift and Shift approach.

Based on the continuous delivery principle, the Lift and Shift approach focuses on the incremental migration of on-premise infrastructure toward the cloud. It has been beneficial for our team as it has allowed us to minimize breaking changes, maximize the operational time of the applications, detect issues early in the workflow, and reduce bottlenecks that may appear along the way.

During this process, collaboration between developers and SREs is crucial. Our teams work together to continuously share context and keep eachother up to speed on their work. SREs and developers are both part of Agile rituals, taking part in pairing sessions and technical discussions to overcome challenges and to create knowledge redundancy along the team.

Our Journey Toward Serverless

When reading the word “serverless”, we get the idea that we won’t be using any servers, or, at least, that we will be using fewer servers. Initially, this can be a little tricky to understand. What the word “serverless” really means is that most of the maintenance efforts of servers will be delegated to a third-party service. It’s important to keep in mind that there are still some operational tasks to be done by SREs.

Apart from the benefit of reduced maintenance efforts, features such as monitoring, observability, isolation of services, and auto scaling will also require less effort from the team in the long run. We, therefore, can switch our focus to adding value to clients with cost-effectiveness and features that fulfill their business needs.

Based on the Lift and Shift approach, the road that our team has taken toward serverless has been incremental. Starting from the serverless proposal for our clients to containerizing the applications and successfully implementing services such as Fargate and ECS (Elastic Container Service).

When presenting a proposal to clients, it is important to consider the abstraction involved in the terminology “serverless”. To demystify this abstraction we highlighted the benefits and the added value both mid and long-term.

Another key point for the implementation of serverless is proper planning. It is important to assess the challenges and plan accordingly. Some points to consider are:

  • Become familiar with the current infrastructure and its requirements.

  • Have a clear understanding of the effort, cost, and benefit relation in terms of the added value for a specific project.

  • Know your team and their knowledge-base regarding serverless skills.

  • When containerizing the application, optimize it for production environments.

  • Make changes in the CI/CD (Continuous Integration Continuous Deployment) workflow to support both the traditional and serverless architectures during the transition phase when using the Lift and Shift approach.

  • The configuration and observability management for traditional and serverless architectures is vastly different, therefore, context sharing is crucial.

  • Finally, be prepared for the worst-case scenario. Don’t forget about a backup plan and a clean-up of unnecessary infrastructure.

Lessons Learned

After learning about the benefits of implementing serverless, we also noticed some challenges, lessons, and best practices that we will definitely take into account in future implementations:

  • Context sharing through pairing sessions is crucial for SREs when containerizing the application and for developers when managing environment configurations.

  • Resource mapping is highly important when containerizing the application, since we don’t want to over provision or under provision the containers’ resources.

  • Implementing serverless also involves becoming familiar with different tools for routine tasks. Collaboration between developers and SREs is important in this phase: SREs need to set up a different tooling and share context with the team, and developers need to learn how to use this tooling and accomplish different tasks like troubleshooting.

  • Writing documentation while transitioning to serverless architectures is helpful for the team when using a different tooling, since it facilitates sharing context between team members.

  • Containers are ephemeral. Defining good practices for managing assets such as persistent storage on the cloud improves availability and resilience.

  • At Stack Builders, testing is an essential practice. Proper testing of the application is needed before implementing serverless architecture in the production environment to anticipate possible production incidents.

Tips and Tricks by AWS experts for a smoother serverless transition

The conference provided us with great insights regarding serverless architectures. These insights will make it easier to overcome the challenges that our teams experience while implementing serverless.

  • Properly managing termination signals prevents us from having issues during the healthcheck and auto scaling processes.

  • It’s a good practice to define a timeout for container healthchecks.

  • There is no one-size-fits-all solution, a case-by-case analysis should be performed to choose the most appropriate solution depending on the application.

  • The concept of resiliency should also be taken into account, both when presenting a solution and when backing up data.

  • With the transition from traditional cloud deployments toward the packaging of dependencies when using containers, the need to rely on image versioning as a good practice to create immutability arises.

  • The Lift and Shift as an incremental approach to make upgrades in the architecture is useful to avoid breaking changes and identify issues in early stages.

  • Even though context sharing is essential to reduce friction between developers and SREs, it is worth exploring services that can support this effort and give autonomy to SREs and developers, for example, the templating service Proton.

Conclusions

Over the last year our team has been progressively migrating cloud infrastructure to serverless architectures. During this process we’ve experienced the benefits of implementing serverless and following the Lift and Shift approach.

The benefits of serverless are experienced mid and long-term as reduced maintenance effort invested by the team, and in consequence, reduced maintenance costs. Some other benefits are rapid feature delivery and increased availability of applications. In serverless, since most of the maintenance tasks are handled by a third-party service, the team is now able to refocus their efforts on the delivery of features to empower business needs.

When implementing serverless architectures, the Lift and Shift approach has allowed our team to minimize breaking changes, maximize the operational time of applications, detect issues early in the workflow, and reduce possible bottlenecks. An example of such a bottleneck being blockers the team may encounter due to tasks that are dependent on both SREs and developers.

Lessons learned by our team from previous implementations along with the best practices, services and tips from the AWS re:Invent conference will smooth our way toward serverless and help us better support our clients and development team with feature delivery.

Written by


DevOps

Sebastián Estrella

Grace.png

Grace Montenegro