Cut CI/CD Costs with Alibaba Cloud Serverless Containers: A Moka Case Study
This article details how Moka migrated its CI/CD pipeline to Alibaba Cloud's serverless container service (ACS) on an ACK cluster, addressing high concurrency pain points, implementing step‑by‑step runner configuration, and achieving significant cost savings, higher resource utilization, and faster job execution.
Background
Moka, one of China’s fastest‑growing HR SaaS providers, moved its legacy monolithic architecture to a cloud‑native stack on Alibaba Cloud ACK in 2020 to satisfy rapid iteration, stability, and scalability requirements.
Business Architecture & Pain Points
The original GitLab‑runner deployment on fixed nodes suffered from severe congestion during peak hours (CPU at 100 %, disk I/O saturation), frequent job failures, high manual maintenance effort for scaling, and low overall resource utilization (about 64 % waste).
Solution Design
To solve these issues, Moka adopted Alibaba Cloud Serverless Container Service (ACS) via the ACK Virtual Node plug‑in. ACS provides on‑demand billing, fine‑grained compute (minimum 0.25 vCPU + 0.5 GiB), best‑effort pricing (≈80 % cheaper than default), and seamless integration with existing ACK clusters.
Implementation Steps
Enable ACK Virtual Node and activate ACS in the existing ACK cluster.
Deploy a new GitLab Runner with an acs label using Helm; modify values.yaml to add the label, set minimal resource requests (the runner itself does not execute jobs), and enable privileged: true for dind support.
Configure the runner’s node selector so that jobs are scheduled onto ACS virtual nodes, using the default compute class to avoid resource contention.
Adapt dind‑based jobs: replace the host docker.sock mount (which requires a physical node) with ACS‑compatible container images and adjust the .gitlab-ci.yml accordingly.
Introduce OSS as a shared build cache: update values.yaml to mount OSS, and add cache key and path definitions in .gitlab-ci.yml so that each job uploads and downloads artifacts from OSS.
helm upgrade --install --namespace gitlab-runner gitlab-runner gitlab-runner -f values.yaml gitlab/gitlab-runnerResults
Job scheduling latency dropped to 5‑8 seconds, and build times were comparable or slightly faster than the previous node‑based approach. Resource waste fell from 64 % to under 20 %, and total compute cost decreased from 115,200 core‑hours to 24,540 core‑hours, while user experience became stable.
Final Architecture
Approximately 80 % of the original node pool was replaced by ACS virtual nodes, with the remaining 20 % kept as standby. The architecture diagram (see image) shows the ACK cluster, Virtual Node, ACS containers, GitLab Runner, and OSS cache working together.
Business Value
Since ACS went live, Moka now schedules thousands of daily CI/CD jobs without resource contention or frequent failures, achieving the “cost‑cutting and efficiency‑boosting” goals while simplifying operations and reducing maintenance overhead.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
