At the 2020 AWS re:Invent, Amazon Web Services (AWS) discussed best practices for application migration in sessions like The Cutover: Moving Your Traffic to the Cloud.
The presenters discussed how each migration plan should contain 4 primary goals:
- Zero or minimum downtime
- Reduced risk of data loss
- Fast rollback
- Traffic and log monitoring
Best Practices for Migration Cutover
To achieve these goals, it’s important to ensure that the traffic cutover is performed correctly.
In ClearScale’s experience, a simple way of migrating is cutover with DNS. To prepare for the migration, we change time-to-live (TTL) to a lower value in advance. That helps resolve new DNS values for all new connections. DNS checking tools can be used to monitor DNS propagation in order to understand which endpoint currently uses the most providers.
But there are a few technical issues you should keep in mind:
- Some providers could ignore low TTL
- Persistent connections
- Browser caching
The most critical points to consider are:
- The need to use dashboards and monitoring to understand which DNS records are utilized.
- Amazon Route 53 DNS service can be used for gradual cutover with weighted round-robin, latency-based routing, and geo-based routing. (For example, AWS Route 53 helps to split network traffic: 5% to AWS and 95% to your on-premise environment.)
You can prepare to migrate by using HTTP response status code 301 Moved Permanently for permanent redirects to your environment endpoint in AWS.
Leveraging Amazon CloudFront
Amazon CloudFront content delivery network (CDN) can also help cutover traffic in several ways:
- Cache your on-premise data until you want to switch traffic
- Switch and propagate to AWS endpoint distribution
- Use redirect rules within AWS CloudFront
- Use CloudFront Lambda@Edge code to handle custom redirect rules
- Perform gradual cutover for stateful applications based on cookies verification
- Individual components migration
Additional points of interest in using AWS CloudFront for application migrations include:
- Custom Errors: Generate custom errors and cache error responses
- Stale Cache: Leverage stale content when the origin is unavailable
- Original failover: Configure failover on 4хх/5хх errors
The most important aspect of migrating to AWS is traffic switching and cutover. For most organizations, cutover with zero or minimal downtime is a critical part of the migration. In this post, we’ve shared some best practices which should be added to your application migration plan to help you achieve these goals.
As an AWS Premier Consulting Partner with the Migration Competency, ClearScale offers a complete range of cloud services including migrating workloads to AWS. We can assist with your workload migrations and help you choose the best option for your organization. Contact us to schedule a free consultation with our cloud experts.
Get in touch today to speak with a cloud expert and discuss how we can help: