Mike Mackrory
Mike Mackrory
February 27, 2019

5 best practices for a successful monolith to cloud-native migration

Migrating your applications from a monolith architecture (in which all application components are deployed as a single piece of code) to a cloud-native model could be just the thing that your business needs to take things to the next level. There are many advantages to such a migration.

But like most things in life worth doing, making the transition to cloud-native can be tough. There are many pitfalls you could encounter that could make the migration not worth the effort.

In this article, we’re going to identify some best practices to help you avoid that eventuality and make your app’s migration to the cloud as advantageous as possible.

Cloud-native, microservices, and other terms you need to know

Before we talk about best practices for making the transition, let’s explain what cloud-native means and define some common terms, so that we know what our end-goal is.

Cloud-native applications are applications that are designed and developed based on the cloud model. They can take advantage of existing cloud infrastructure and services, and the processes used to develop, deploy and maintain them offer increased agility, scalability, and reliability.

Any discussion about cloud-native applications usually involves talk about microservices. Microservices are small, independent applications which are connected to form large, complex, distributed systems. Microservices have a particular and focused use. A good example would be an address validation service. Any service in our system which needs an address validated can use this service. This approach offers numerous benefits:

  • A single service controls address verification.
  • Updates to the address verification are contained within a single service.
  • We can deploy updates without redeploying our entire application.
  • Verification problems can be easily traced back to a specific service.

Containers are an excellent way to manage and deploy microservices. A container consists of an entire service, which can be deployed in different environments and thoroughly tested as a stand-alone unit.

Finally, the terms DevOps and CI/CD are important to recognize. DevOps refers to the combining of your development and operations teams into agile teams that can manage a service from design to deployment, and handle the support and maintenance of the service once it is in production. It requires a paradigm shift, but drastically improves ownership and responsibility.

CI/CD refers to continuous integration and continuous deployments. New code changes travel through an automated pipeline that executes various test suites and deploys the new service into the production environment. Both DevOps and CI/CD require a change in paradigm and the adoption of a fail-fast strategy. The results are more improvements, introduced more often for your users.

Best practice 1: Understand the goal and the costs

I’ve seen incredible benefits from moving services into the cloud, but I also know that it requires a significant investment, both in technology and the training of an engineering organization. If your goal for going to the cloud is to increase sales or to have something to report at your next shareholders meeting, migrating to the cloud might not be in your best interest.

Beginning a migration to a cloud-native model may be the right approach if you’re looking for a platform which offers:

  • Scalability
  • Improved agility
  • Portability
  • Maintainability

Even with these potential benefits, you should only select this approach after a careful review of the migration costs and a commitment from your organization to see it through to the end.

Best practice 2: Make security a priority from the start

Moving your application to the cloud allows you to reach a broader audience, but it also increases your security exposure. It’s essential that you begin the discussion about security early in the process, and implement policies and procedures before you begin development.

In addition to the risk of exposure of sensitive data, new legal requirements such as the GDPR in the EU require organizations to implement specific practices around their users’ data. These requirements are far easier to implement at the beginning of a project, rather than trying to retrofit them once a project is complete.

Best practice 3: Define all your interfaces first

An essential characteristic of cloud-native applications is the ability to interface with other applications to support enhanced capabilities. Applications communicate through interfaces called APIs. An API, or Application Program Interface, allows the exchange of information between two applications or services. Beginning your project by defining these interfaces is known as API-First development, and offers many critical advantages.

  • Engineers know the input and output formats for their applications up front.
  • Dependent teams can mock out APIs to accelerate development.
  • Corporate security and data quality standards can be reviewed early on.

API-based design also allows engineering teams to introduce improved functionality behind an agreed-upon API without requiring updates to services which depend on the API.


updating a service behind an API
Fig. 1: Updating a service behind an API

Best practice 4: Make monitoring a priority

The challenge with cloud-native applications is that you’re building a distributed system. Understanding the health of your system and monitoring important aspects requires a robust and scalable monitoring system. The monitoring solution you select should include:

  • Log aggregation.
  • APM, or Application Performance Management, which monitors characteristics like CPU usage, memory availability, traffic, and error rates.
  • Automated alerts when critical thresholds are breached or unexpected events occur.

Like security, beginning your project with a defined monitoring strategy is much easier than retrofitting a solution when the project is nearing completion.

Best practice 5: Use existing cloud infrastructure

Migrating your applications to the cloud can require a monumental effort, but you don’t have to reinvent the wheel. And if you’re moving to a cloud service like AWS, Azure or Google Cloud, you’ll have access to functionality which has been developed specifically for the cloud and is subject to continuous testing and improvement.

In a recent project I was involved in, we made extensive use of SQS, SNS, and DynamoDB from Amazon to support our services. These services provided scalable messaging and data storage solutions and allowed us to focus on the core functionality of our services.

Learning more

The five best practices I outlined above aren’t an exhaustive list, but they are crucial considerations which I’ve seen make or break migration projects. Consultation with an organization that specializes in supporting these types of migrations, like Thriftly, can also increase your chances of success.

Finally, seek out case studies for organizations similar to yours which have migrated to the cloud. Understanding the challenges they faced and how they overcame them can help you learn from their mistakes and afford you the ability to make informed decisions moving forward.

get the guide: accelerate your app modernization with Thriftly

comments
0