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

The article introduces Hulk, a Go service development framework created by the short‑video R&D team to replace PHP monoliths, outlines its background, design principles, component hierarchy, comparison with GDP2, and demonstrates how its built‑in monitoring, configuration, and tooling improve code quality, development speed, and SRE efficiency across Baidu’s short‑video services.

High Availability Architecture
High Availability Architecture
High Availability Architecture
Hulk: A Go‑Based Web Service Framework for Short‑Video Backend Development

Hulk is a Go‑based web service framework developed by the short‑video R&D department to support the migration from PHP to a high‑performance Go ecosystem. It was born from the need to upgrade the existing architecture, addressing problems such as low development efficiency, limited release throughput, poor runtime performance, and insufficient SRE observability.

The framework is compared with the internal GDP2 platform, highlighting shared capabilities (e.g., BNS, net, codec) and additional features Hulk provides, such as enhanced Redis/MySQL clients, custom middleware, distributed locks, and integrated monitoring components.

Hulk’s architecture is organized into four layers: basic components (logging, cloud‑native monitoring, configuration center, event tracing), common components (RAL wrapper, service governance via Sentinel, coroutine pool, notification integration), extended components (enhanced Redis, MySQL with metrics and Sentry hooks, distributed lock, scheduled tasks), and an HTTP server layer offering a rich set of middleware (logger, timer, recover, flow control, timeout) and management APIs.

Key capabilities include:

Improved code quality through standardized project layout, code generators, Baidu Go coding guidelines, and static analysis tools.

Accelerated development cycles via reusable components, configuration‑driven behavior, and low‑code integrations (Apollo/iConf).

Enhanced SRE efficiency with built‑in event tracing (Sentry), alerting (Ruliu), multi‑dimensional Prometheus metrics, ftrace log querying, and a custom service visualization and fault‑localization system (Artemis).

The ecosystem surrounding Hulk comprises standard directory conventions, a code generator, a shared library (hklib), integrated infrastructure (Prometheus+Thanos, Sentry, Apollo, Pyroscope), and internal tools such as iConf and Artemis for configuration management and real‑time monitoring.

Deployment statistics show that all short‑video Go services now run on Hulk, delivering measurable resource savings and performance gains compared to the legacy PHP stack.

In summary, Hulk is not a reinvented wheel but a business‑driven extension of existing open‑source tools, providing a cohesive Go ecosystem that supports development, deployment, operation, and maintenance for high‑scale short‑video services.

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.

BackendmonitoringMicroservicesDevOpsFramework
High Availability Architecture
Written by

High Availability Architecture

Official account for High Availability Architecture.

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.