Hulk: A Go Web Service Framework for Short‑Video Backend Development

Hulk is a Go‑based web service framework created by the short‑video R&D team to replace a PHP monolith, extending the unreleased GDP2 platform with business‑specific wrappers, a four‑layer architecture, and integrated monitoring, tracing, and deployment tools that dramatically boost development speed, runtime performance, and SRE efficiency for high‑traffic short‑video services.

Baidu Geek Talk
Baidu Geek Talk
Baidu Geek Talk
Hulk: A Go Web Service Framework for Short‑Video Backend Development

Hulk is a Go service development framework created by the Short‑Video R&D department, based on the Go Develop Platform (GDP2). It is a business‑oriented web development framework that provides many out‑of‑the‑box components and functions to quickly build web services, and it builds a Go ecosystem that fits the business scenarios of the short‑video services.

Background : The original short‑video backend was built with PHP for rapid iteration. As the product grew to tens of millions of DAU, the monolithic PHP architecture faced problems such as low development efficiency, slow release cycles, poor runtime performance, and limited SRE capabilities.

The issues were summarized as four "efficiencies": development, release, runtime, and SRE. To solve them, the team pursued a "four‑dimensional" transformation covering business architecture, deployment architecture, and underlying infrastructure.

Why not use GDP2 directly? At the time of the Go migration, GDP2 had not been officially released, so Hulk was built to fill the gap.

Capability comparison with GDP2 : Hulk reuses many GDP2 components (e.g., BNS, net, codec), adds business‑specific wrappers for http server, RAL, Redis, MySQL, and integrates additional infrastructure such as Prometheus + Grafana, Sentry, and fault‑location systems.

Framework design : Hulk follows a four‑layer architecture.

1. Basic components (logging, cloud‑native monitoring, configuration center, event tracing).

2. Common components (RAL wrapper, service governance based on Sentinel, coroutine pool, event notification via Ruliu, management control interfaces).

3. Extended components (Redis with metrics, Sentry, downgrade and circuit‑breaker hooks; MySQL with metrics and Sentry hooks; distributed lock based on RedSync; two modes of scheduled tasks – with or without distributed lock).

4. HTTP server provides many middleware (logger, timer, recover, flow control, timeout, etc.) and management APIs (health check, service governance, metrics, performance debugging).

Ecosystem : Standard directory conventions, code generator for project scaffolding, hklib (common library with 50+ service clients), infrastructure (Prometheus + Thanos, Sentry, Apollo, Pyroscope), internal configuration center (iConf), and the Artemis service‑visualization & fault‑location system.

Application results : All short‑video Go services now run on Hulk, achieving resource savings, performance improvements, and higher availability. The framework enables faster development cycles through reusable components, configuration‑driven behavior, and low‑code integration.

SRE improvements : Real‑time event tracing with Sentry, alerting via Ruliu, multi‑dimensional monitoring with Prometheus and SIA, ftrace log querying, and the Artemis platform that visualizes service topology, near‑real‑time metrics, key logs, and call chains, allowing seconds‑level fault localization.

Conclusion : Hulk is not a wheel‑reinvention but a business‑driven extension of open‑source tools (GDP2, Sentinel, etc.) that provides a complete Go ecosystem for development, deployment, operation, and maintenance of short‑video services.

Appendix : Links to the Hulk documentation (http://hulk-go.baidu-int.com/) and GDP2 documentation (http://gdp.baidu-int.com/). The article also contains a recruitment notice for the Short‑Video R&D department.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Backendmonitoringcloud-nativeMicroservicesGoDevOpsFramework
Baidu Geek Talk
Written by

Baidu Geek Talk

Follow us to discover more Baidu tech insights.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.