The platform's ~1B-document task index moved from one Elasticsearch data model to another — no downtime, no rollback, no user-visible incident. About four weeks of engineering; 1–3 hours of actual data movement. This is how it was done.
Designing a Predicate-Driven Audience Pipeline for Lifecycle Email
Every lifecycle campaign ended up combining the same three kinds of data: a user's latest traits, their event history, and assets that expire. Operations assembled each audience by hand. The platform already ran the transactional services and the TiDB/TiCDC/Kafka/Flink data path from the earlier post in this series; what was missing was a way to define an audience once, reuse it, and let an email task run on it.
I wrote the design document and early core demo for predicate expansion, SQL compilation, segment refresh, and the reach handoff. A colleague implemented the production services with my guidance.
Building a Real-Time Data Platform With TiDB CDC and Flink
The Go backend platform had been established earlier in 2025 and eventually carried eighteen Go domain services. Product teams could ship features, but operational questions still required ad-hoc production queries. Dashboards were slow, and linked views could not be trusted to refresh from a consistent snapshot.
Four Go engineers had to build the data platform alongside feature delivery. We could not operate a separate OLAP database, sync pipeline, and dedicated data engineering function, so we built TiCDC → Kafka → Apache Flink → analytical tables in TiDB, served by QueryHub, a self-developed SQL-template service.