ral-knowledge

Initialize and configure RAL traffic scheduling for GDP and non-GDP Go services.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill ral-knowledge-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ral-knowledge
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/ral-knowledge
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill ral-knowledge-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up RAL (Resource Access Layer) correctly differs between GDP and non-GDP services, and misconfigured initialization or routing strategies cause cross-region traffic failures that are hard to diagnose. ## Core Features & Use Cases - Initialization Guidance: Step-by-step setup for GDP services via regionrouter plugin and non-GDP services via bridge.Init with framework adapters for Kitex, Hertz, Ginex, Consumer, and FaaS. - Traffic Scheduling Configuration: Configure Topology, StoreRegion, VideoRegion, and Custom routing strategies in conf/ral/services/rpc.yaml with method-level granularity. - Build Script Adaptation: Modify build.sh to recursively copy RAL configuration files for non-GDP services. - Use Case: A developer needs to route RPC calls to the data home region based on user ID. This Skill guides them to configure the storeregion strategy with EntIDGetter and IDField, then verify via target_vregion in logs. ## Quick Start Ask the AI to initialize RAL in your non-GDP Kitex service and configure a storeregion routing strategy for a specific RPC method.

Frequently Asked Questions about ral-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize RAL in a non-GDP Go service?

Call bridge.Init with bridge.WithRal() and bridge.WithRegionrouter(), then inject the framework-specific middleware for Kitex, Hertz, or Ginex. Finally, update build.sh to recursively copy RAL config files into output/conf.

How to configure StoreRegion routing strategy in RAL?

In conf/ral/services/rpc.yaml, set Strategy to storeregion under the method, specify EntType (user or video), EntIDGetter (fromreq or fromctx), and IDField when using fromreq. RAL then routes requests based on the entity's data home region.

Does RAL work with Kitex and Hertz frameworks?

Yes, RAL supports Kitex and Hertz through bridge middleware packages. For Kitex, add bridgeKitex.NewMiddleware() to the server; for Hertz, apply bridgeHertz.NewMiddleware() to the router. Kitex version must be v1.15.5 or >=v1.18.0.

How do I verify RAL traffic scheduling is working?

Check service logs for Notice entries containing the target_vregion field, which shows the actual routed region. You can also manage configuration rollout with gdp iac preview ral and gdp iac apply ral before verification.

What is the difference between Topology and VideoRegion strategies?

Topology is the default strategy that follows the downstream service's deployment topology. VideoRegion routes requests to the region where the video entity resides, requiring EntType video, RoutingByMesh, and a VID field getter.