Increasing agility with a modern microservices architecture on AWS
Increasing agility with a modern microservices architecture on AWS
eCommerce – Food Delivery
Founded by Ali Al-Ebrahim in 2018, with offices in UAE, KSA, Kuwait, and Egypt COFE is an online coffee marketplace delivering a seamless user experience. Making Coffee Ordering Fast & Efficient, the COFE App gives users access to a wide range of coffee choices from International Franchises to local artisanal coffee houses and roasteries. Launched with Kuwait as its test market, the app is all set to go international in the near future.
“The COFE App was originally built using a monolithic architecture aimed at simplifying development, testing, and deployment,” says Wael Al Aaraj, VP of Technology at Bespin Global MEA. “However, while the monolithic approach worked well in the early stages of the project, COFE soon realized that it had significant limitations that needed to be addressed. That’s when they contacted Bespin Global based on our experience developing microservices architectures running on AWS.”
While monolithic applications may be easier to develop, there are significant limitations as new features and functions are added, increasing overall complexity. For example, as the COFE app evolved based on user feedback and new go-to-market initiatives, the various components were growing in size, maintaining and publishing new versions of the application became a tedious process. Furthermore, with each update—no matter how minor—the entire application had to be redeployed.
“Despite having the goal of being a modern, agile company,” continues Al Aaraj, “as the COFE App evolved, COFE found themselves becoming bogged down in maintenance activities. Since the impact of each change on the application as a whole was not well understood, extensive manual testing was required for each change, making continuous deployment difficult. In addition, monolithic applications can be difficult to scale when different modules have conflicting resource requirements.”
“To overcome COFE’s challenges,” says Hamzeh Shaghlil, AWS Solutions Lead at Bespin Global MEA, “we focused on developing a new microservices architecture that would allow COFE App to take advantage of the modernization and scalability capabilities of AWS.”
Choosing the Right Strategy
“Bespin’s mandate was to provide the microservices architecture, project oversight, and optimization suggestions for deploying a modern app in AWS environment using agile methodologies,” explains Iyad Abu Mallouh, Director of Product Management at COFE App. “We wanted to leverage their expertise and experience to ensure that COFE App followed best practices and standards for deployment in the AWS environment using different DevOps tools and methodologies.”
Bespin and COFE also used the project to introduce state-of-art DevOps best practices and tools to automate the development workflow and software deployment. After evaluating COFE’s existing environment and processes, Bespin decided on a suite of technologies that could be seamlessly integrated and used to test each use case during the various integration and deployment phases from both a code and a functionality perspective.
“In the end, we decided that the best way to meet COFE’s business objectives was to build and deploy seven microservices using various CI/CD technologies,” states Hamzeh. “We decided to use Bitbucket’s CI/CD service to help automate the release pipeline; Terraform Cloud to create, update, and version the AWS infrastructure; and Argo CD and Argo Rollouts to deploy and monitor the COFE App to Kubernetes on AWS. We also chose other security tools to help us discover vulnerabilities in the application source code, and maintain the high quality of our code.”
Streamlining the Workflow
“Combining Bitbucket with Argo CD and Argo Rollouts was the right decision,” says Dania Alrefai, Senior DevOps Engineer at Bespin Global MEA “but that doesn’t necessarily mean it was easy. We faced several challenges while implementing the solution, starting with the pipelines and ending with the architecture.”
Ensuring the consistent deployment of microservices, Bitbucket allows developers to build quality software at scale. A self-managed solution providing source code collaboration for distributed teams, Bitbucket supports sandbox, UAT, and production environments, using various requests and tags to trigger the pipeline into moving code from one environment to another. Integrated with Bitbucket, Argo CD continuously monitors the COFE App, comparing its live state to the desired application state specified in the Git repository. Argo CD also provides visibility into the health of the Kubernetes pods via a visual UI with integrated Helm charts. In addition, Argo Rollouts was chosen because it offers increased availability with its advanced blue-green deployment capabilities.
“Since every app is different,” says Alrefai, “we implemented and tested various deployment strategies to ensure we got it right. We recorded our observations—including what we liked and didn’t like—and presented them to COFE, soliciting their feedback before returning to the drawing board. We always strive to satisfy the development and publishing vision of our clients.”
“When you’re using multiple different tools, each with its permissions and limitations,” emphasizes Shaghlil, “ensuring that the data is protected as it traverses the pipeline is critical. In addition, each piece of the pipeline required extensive testing in terms of meeting functional specifications and maintaining best practices in terms of security and performance.”
Based on previous experience and seamless integration with the rest of the pipeline, Bespin chose a tool specifically designed to reduce the risk of breaches and data exposure in a low-trust environment with identity-based security automation and encryption-as-a-service.
“At an architecture level, the main challenge we faced was integrating this tool with AWS,” states Hamzeh Shaghlil and Dania Alrefai. “This involved a high degree of complexity, especially with AWS Key Management Service, a managed service designed to simplify the creation, management, and control of the cryptographic keys used to protect data. Although it took a bit of time, we eventually managed to get the auto-unseal working and enabled encryption to benefit from AWS key management.”
“The use of COFE App can vary significantly from day to day,” explains Mallouh. “As a result, we need to be able to scale our services on-demand and maintain over 99.99% availability. Moreover, since customers use COFE App at all times of the day and night, 24/7 support is critical for our business. We contracted Bespin to manage the environment based on specific SLAs, giving us the availability, flexibility, and scalability we need to satisfy our customers and grow our business.”
In addition to providing 24/7 integrated support services—including application and infrastructure monitoring, incident response, backup, and disaster recovery—Bespin’s Managed Services team works directly with COFE App’s consulting team to evaluate Amazon CloudWatch and AWS Compute Optimizer logs and metrics and make recommendations for optimizing the environment. As a result, the COFE App application and infrastructure workload components are continually optimized using AWS security, operational, and financial best practices.
“COFE also took advantage of our FinOps expertise and best practices,” adds Alrefai. “Bespin’s Managed Services team supports COFE by tracking cost and usage trends. Then, we analyze the information to detect spending anomalies and resource constraints, providing platform optimization and multi-account cost management recommendations.”
RESULTS & BENEFITS
“Moving the COFE App to a microservices architecture has reaped significant technical benefits,” states Al Aaraj. “The application is more fault tolerant because each service is isolated, and the fact that each microservice can be deployed independently means that each business component—the COFE Store, COFE Credits, Gift Cards, and Rewards—can be prototyped, developed, and produced more quickly. That’s huge for the business when it comes to maximizing customer engagement and spend!”
The new architecture also enables continuous integration and delivery, making it easy to try out new ideas or roll back if something doesn’t work. Since the cost of failure is low, experimentation is encouraged, and the time-to-market for innovative new features is significantly faster than before. In addition, the microservices architecture allows each service to be scaled independently to meet demand for the feature it supports, reducing infrastructure costs and mitigating the risk of capacity-related service outages.
“Working with Bespin to modernize our platform has brought numerous business benefits,” says Mallouh. “First, it’s enabled us to increase productivity and drive more sales because we’re delivering new features much faster. As a result, our customers are happier, and the increased sales enhance our ROI. Moreover, as an online company, we’re now agile enough to build and deliver new products, functions, and features at a rate that keeps our customers excited and engaged.”
About Bespin Global, an e& enterprise company:
An AWS Premier Tier Services Partner and AWS Managed Service Partner, BESPIN GLOBAL MEA (Middle East and Africa) is a leading provider of automated cloud solutions and consulting services, including cloud adoption, strategy, migration, implementation, Managed Services, DevOps, FinOps and Data & Analytics. Bespin is positioned as a Leader in Gartner’s 2020 Magic Quadrant for Public Cloud Infrastructure Professional and Managed Services, as well as a “Visionary” in Gartner’s 2022 Magic Quadrant for IT Transformation Services.
In late 2022, Bespin Global MEA and e& enterprise formed a joint venture with the aim to assist enterprises in their digital transformation journey and eventually become the largest pure-play public cloud-managed and professional services provider in the Middle East, Turkey, Africa, and Pakistan.
Bespin’s cloud FinOps management platform, OpsNow offers an automated end-to-end solution for customers to effectively manage cloud assets and costs, optimize cloud expenses, and automate the implementation of cloud governance policies across multi-cloud environments.
Address: The Offices 4, #138-139, One Central, Dubai World Trade Center (DWTC)
Telephone: 800 BESPIN (237746)
P.O. Box: 340729