Client
Smiles is one of the largest loyalty programs in Brazil, with 16 million participants as of March 2019. Created 25 years ago as Varig's loyalty program, it was later acquired by GOL and became an independent company in 2013, raising R$ 1.1 billion through an initial public offering (IPO).
The loyalty program is known for innovation and pioneering with the launch of products and services since 2013, such as Clube Smiles, Viaje Fácil, and Conta Família. The company also has the longest mileage validity in the market, ranging from 3 to 10 years, depending on the customer's category.
Challenge
Smiles already had a CMS solution running on ECS + EC2, an older version of a Java server-side application that took a long time to initialize. This extended startup time required maintaining more instances than necessary to handle sudden increases in demand, even with auto-scaling enabled and configured. Additionally, the response time to unavailability events and disaster recovery efficiency were compromised.
The company also desired to publish promotions and content changes on its portal more quickly, enhancing its marketing efforts.
Architecture
Some of the AWS services used in this solution:
- API Gateway;
- Route53;
- S3;
- Cloudfront;
- Lambda;
- RDS;
- DynamoDb;
- CloudWatch;
- ECS;
- EKS;
- EC2;
- Cloudformation;
- ECR.
The Solution
To meet Smiles' needs, a project was developed to redesign its digital platform, involving the redesign of a large part of its infrastructure components, DevOps, application layer, and API layer. The project aimed to modernize the main content of the portal using a headless client-side CMS application hosted on Amazon EKS, with its content served via CloudFront and static files stored on Amazon S3.
To ensure an efficient software development lifecycle, the code management process was implemented using GitHub as a repository, with third-party tools hosted on EC2, building, versioning, and deploying to Cloudfront, EKS, S3, API Gateway, and other AWS services. Resource provisioning was mainly done using AWS Cloudformation and, in some cases, Terraform.
Oauth2 was implemented as the authentication mechanism for the application and its APIs, using the API Gateway's native HTTP API integration with Oauth2 providers.
By utilizing CloudFront behaviors and Lambda@Edge, we managed to control and redirect traffic to both new and old content during a transitional coexistence period until all content was migrated.
Result
The combined efforts applied to the project resulted in a new, secure, resilient, efficient, and highly performant web platform. The startup time of the new CMS application dropped from several minutes to just a few seconds using a new version running on EKS.
The new architecture allowed Smiles to publish and update content on its site instantly. To complement this, with the implemented DevOps pipeline, the company's digital platform is constantly evolving, taking advantage of a robust development, testing, and release process.