Why CDN clients are Migrating to Amazon CloudFront
Recent trends indicate that an increasing number of enterprises are opting to migrate from Content Delivery Network (CDN) providers such as Akamai, Cloudflare, Fastly, etc. to the low latency and high transfer speeds of Amazon CloudFront on AWS for three primary reasons:
Competitive on-demand pricing: As part of the AWS Free Usage Tier, AWS users can get started with Amazon CloudFront at no cost. Companies willing to make long-term commitments can save 30 percent or more on charges subsequent to the free tier.
Performance gain: CloudFront leverages the globally established AWS infrastructure to enable better performance.
Deeper integration into the AWS environment: CloudFront allows companies to centralize their configuration and deployment, and take advantage of the broader array of service capabilities available in AWS.
Although the advantages are clear, there are often many questions on how best to embark on the migration process. TrackIt has the experience and expertise in CloudFront migrations to assist in planning a migration from a legacy CDN as well as provide integration and deployment resources for execution.
Planning the Migration
For most well-executed CDN migrations, the majority of the work is done during the planning stage. This critical step of the migration process should be thoroughly and rigorously conducted to avoid complications and setbacks during and after the execution.
The planning process can be broken down into the following steps :
Step #1: Discovery sessions to review existing installations and to ensure that all processes are understood and documented.
Step #2: Assessment of which processes are actual requirements and which are legacy or unused processes from the previous installation.
Step #3: Assessment of the feasibility of migrating the needed processes to CloudFront. Some processes may need to be re-engineered or abridged.
Step #4: Creation of a migration plan that details and provides a timeline for all of the processes to be migrated.
Executing the Migration — Guidelines
With a completed comprehensive migration plan, including detailed action items and their order of execution, the migration becomes a straightforward process.
Prioritize the use of Infrastructure as Code (IaC) tools and avoid manual edits. Ideally, deployments should be done using a tool like Terraform or CloudFormation.
Design the configuration for easy replication so that dev/staging environments can be set up with minimal friction.
The complexity of the IaC configuration should be tailored for the types of users who will be expected to update it. It is common for developers to modify the CDN configuration and this should be facilitated as easily as possible.
Automate the production deployment process where possible. Ideally, it should only be deployed by a CI/CD pipeline hooked to the configuration’s repository. Automated deployments are deterministic, repeatable, and can be rolled back easily in case of issues.
When developing Edge Functions (CloudFront Functions or Lambda@Edge) be wary of the quantity of logs generated. Logs are useful and often necessary for development. However, since log-related costs are linked to the number of requests, expenses can grow very quickly if left in production.
Consolidate monitoring metrics into one dashboard. For multiple AWS services (such as AWS Web Application Firewall, Lambda@Edge, etc), setting up a centralized monitoring dashboard through Amazon CloudWatch is key to overseeing your infrastructure.
Export key statistics from the existing CDN provider. Make a copy of key metrics from the CDN setup, namely the number of requests/day, traffic/day, origin latency (ex: ttfb), cache hit ratio, median 4xx/5xx error percentage, etc. These statistics will help evaluate the performance of the CloudFront configuration after the migration and will enable the quantifying of any regression/growth.
A migration to CloudFront requires thorough and careful planning. To ensure a smooth transition, DevOps teams work closely with clients to thoroughly understand the exact configurations that need to be migrated. The steps and guidelines discussed in this article serve as a firm foundation for organizations to start planning their CloudFront migrations.