Skip to content
Thái Hoàng Mai Học

hoc.thaihoangmai.work@gmail.com

All projects

2023 – 2024, Tiên Phong CDS for King Coffee

Role
Backend Leader and DevOps Engineer
Team
10 people, 50 man-months
Users
5,000+
Website
kingcoffee.com

Business goal

AWS infrastructure and the commerce integration layer for the King Coffee ecosystem (Trung Nguyên International): Super App, in-store ePOS and websites, serving Vietnam, the US, the UK and Pakistan.

The King Coffee ecosystem includes a Super App (retail, F&B, wallet and loyalty), an ePOS app for stores, websites and an admin. Tiên Phong CDS supplied the AWS platform and the commerce integration layer, including inventory sync with the Super App and an MLM module.

Main modules

  • Commerce integration and inventory sync with the Super App
  • MLM module for affiliates
  • MoMo payments
  • Brand websites
  • Admin

My part

Built Multi-AZ AWS infrastructure and carried out every step of the production rollout, serving 5,000+ users across 4 markets.

  • Design and document the AWS infrastructure
  • Carry out the production rollout plan
  • Build the server-side commerce integration layer
  • Operate, monitor and back up the platform
  • Train the client’s engineers on AWS

Result

  • 5,000+users across 4 markets
  • Multi-AZECS Fargate and Aurora MySQL across 2 availability zones in Singapore
  • 4 weeksto stand up a separate European deployment with CMC Telecom

Problems faced

A multi-brand ecosystem with several apps, selling in four markets, so the infrastructure had to carry the load, serve distant users and be safe enough for payments.

How it was solved

  1. Designed a Multi-AZ AWS setup in Singapore: a VPC with 2 public and 4 private subnets, a bastion host, and WAF and Shield at the edge.
  2. Built CI/CD with CodePipeline, CodeBuild and CodeDeploy.
  3. Put CloudFront in front of the websites to cut load time outside Vietnam.
  4. Connected the commerce layer to the Super App for inventory sync and MoMo payments.

Project management process

  1. 1Infrastructure proposal12/2023
  2. 2AWS designMulti-AZ in Singapore
  3. 3CI/CDCodePipeline, CodeBuild, CodeDeploy
  4. 4Production planStep by step, carried out by me
  5. 5Go-live5,000+ users, 4 markets
  6. 6European deployment4 weeks with CMC Telecom
  7. 7OperationsBackups, monitoring, AWS training
  • AWS Singapore across two availability zones: ECS Fargate with auto-scaling, Aurora MySQL Multi-AZ with a read replica.
  • A step-by-step production rollout plan, with me carrying out every step.
  • A separate deployment for Europe, built with CMC Telecom as AWS partner in four weeks.
  • Daily backups kept for 7 days, then cold storage; S3 moves to a cheaper class after 30 days.
  • AWS training material for the client’s engineering team.

System architecture

  1. Users
    • Super App
    • ePOS
    • Brand websites
    • Admin
  2. Edge and security
    • Route 53
    • CloudFront
    • WAF + Shield
    • ALB
  3. Services
    • ECS Fargate: Lumen API, auto-scaling
    • Commerce integration
    • MLM module
  4. Data
    • Aurora MySQL Multi-AZ
    • RDS PostgreSQL (ERP)
    • ElastiCache Redis
    • EFS
    • S3
  5. Integrations
    • Super App inventory sync
    • MoMo
  6. Infrastructure and DevOps
    • CodePipeline → CodeBuild → CodeDeploy
    • CloudWatch
    • CloudTrail
    • AWS Backup

Tech stack

Applications
  • Angular
  • NuxtJS
  • Flutter
  • PHP Lumen
Data
  • Aurora MySQL
  • RDS PostgreSQL
  • ElastiCache Redis
  • EFS
  • S3
AWS infrastructure
  • ECS Fargate
  • ECR
  • CloudFront
  • WAF
  • Shield
  • ALB
  • Route 53
  • VPC
DevOps
  • CodePipeline
  • CodeBuild
  • CodeDeploy
  • CodeCommit
Operations and security
  • CloudWatch
  • CloudTrail
  • AWS Backup
  • Secrets Manager
  • KMS