Santekno
Projects/PSM Migration Engine for a Promotion Aggregator Service
ByteDance logoPart of ByteDance · Software Engineer, Promotion Platform Team
Backend / APILive

PSM Migration Engine for a Promotion Aggregator Service

Assessed, re-architected, and migrated a promotion aggregator service to PSM, leading a zero-disruption cutover validated with QA testing and reusable custom metrics.

2025-psm-migration-merchant-voucher-aggregator · main
# E-Commerce / Infrastructure
$ go -X POST /2025-psm-migration-merchant-voucher-aggregator/v1/sync
→ 201 Created
{ "status": "ok" }
publish 2025-psm-migration-merchant-voucher-aggregator.synced
Role
Backend Engineer
Timeline
2025
Team
3
Domain
E-Commerce / Infrastructure
Stack
7 tech
Status
Live
01

Overview

This project migrated a promotion aggregator service onto PSM. I performed a comprehensive assessment of the service's resource usage, flow, and requirements, then re-architected the codebase for the new environment and led the cutover from planning through a smooth, disruption-free release.

A backend has no screens, so its "UI" is the operational surface: custom Metrics dashboards, the migration/ops flow, and the QA test matrix.

Grafana — custom Metrics for the migrated service
Ops view — platform allocation & cutover flow
Test matrix — manual, regression & live testing
03

Problem & Solution

Problem

Moving a live aggregator to a new runtime meant every resource dependency had to be understood, re-provisioned on the internal serving platform, and sized correctly for efficiency. The service also had to cut over without any interruption to callers.

Solution

I submitted platform resource allocation requests, prepared and re-architected the codebase for the new environment, and analyzed post-migration resource needs using the internal cloud platform usage model for an efficient footprint. I led the cutover end-to-end and collaborated with the QA engineer on manual, regression, and live testing, while compiling reusable custom metrics queries for the team.

04

Workflow

Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.

flowchart diagram

request

new env

cutover

metrics

Resource Assessment

Platform Allocation

Re-architected Code

PSM Runtime

Prometheus / Grafana

Use case interaction
sequence diagram
QAAggregator Service (PSM)Serving PlatformEngineerQAAggregator Service (PSM)Serving PlatformEngineerrequest resource allocationPSM environment readydeploy re-architected servicemanual / regression / live testsign-offexecute cutover
Cutover sequence
05

Architecture

flowchart diagram

custom metrics

Callers

Promotion Aggregator Service · PSM

Managed RDS

Serving Platform

Prometheus / Grafana

System architecture
Architecture notes

The re-architected promotion-aggregator-service runs on PSM with resources allocated through the internal serving platform and the internal cloud platform, backed by a managed RDS (relational database) and instrumented with custom metrics exported to Prometheus/Grafana. The cutover followed a staged path — assess, allocate, re-architect, test, release — so the migration was observable and reversible at each step.

state diagram

platform resources

code adapted

QA sign-off

release

assessed

allocated

rearchitected

tested

cutover

Migration lifecycle
06

Features

Assessment
  • Resource usage assessment
  • Service flow & requirement analysis
  • Optimized resource calculation
Migration
  • Platform resource allocation
  • Codebase re-architecture
  • Cutover planning & execution
Quality
  • Manual, regression & live testing with QA
  • Reusable custom Metrics queries
07

Tech Stack

language
Go
infra
Serving PlatformPSMinternal cloud platform
database
Managed RDS
observability
PrometheusGrafana
08

Engineering Challenges

01
Learning an unfamiliar migration path

The migration required knowledge I did not have upfront. Fix: I read extensively, asked questions, and dug through explicit and implicit documentation (including internal documentation) to speed up execution.

02
Sizing resources for the new environment

The PSM deployment environment needed the right resource footprint to stay efficient. Fix: I analyzed post-migration needs using the internal cloud platform usage model to calculate an optimized allocation rather than over-provisioning.

03
Cutting over without service disruption

A live aggregator had to move without downtime. Fix: I led cutover from planning to execution and paired with QA on manual, regression, and live testing to keep the release incident-free.

09

Outcomes

0
service disruptions at cutover
3
testing types with QA
PASS
QA sign-off
10

Lessons Learned

The most valuable takeaway was to proactively learn: reading, asking, and experimenting until I uncovered insights — sometimes undocumented — which I then shared with the team, such as a reusable set of custom metrics queries. I also learned not to fear new approaches; as long as changes were safe for platform resources, taking initiative drove more efficient results.

11

Related Santekno Tutorials

Interested in working together?

Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.