Cloud Native 8 min read

Building Cloud‑Native Services with Go: Lessons from Huawei’s Service Center

This article shares Huawei Cloud’s practical experience of using Go to build cloud‑native microservices, covering the evolution of their Service Center, key design patterns such as static‑dynamic information separation, contract‑driven services, dependency management, caching, and the open‑source Go Chassis framework.

Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Building Cloud‑Native Services with Go: Lessons from Huawei’s Service Center

Huawei Cloud’s Go Cloud‑Native Practice

At the recent Gopher China conference, Huawei Cloud chief architect Tian Xiaoliang presented "Huawei Cloud’s Go Cloud‑Native Practice," summarizing years of experience building cloud services with Go.

Background

Since 2016, Huawei Cloud has used Go for core CNCF projects like Kubernetes and Prometheus. Early on, the Go ecosystem was immature, so the team built many foundational capability modules from scratch.

Key Design Insights

From a simple cloud application, the following practices were highlighted:

Static vs. Dynamic Information Definition – Reduce data volume by extracting common parts (service name, version, data center) into static definitions, mapping services to instances 1‑to‑N, lowering network overhead and standardizing the model.

Contract‑Driven Microservices – Each service maintains contract documents (OpenAPI, gRPC proto) bound to its version. Contracts can be uploaded manually or generated automatically, ensuring documentation consistency.

Service Dependency Management – Limit call chains to three services (a→b→c) to simplify troubleshooting and performance. Avoid mutual dependencies that complicate upgrades.

Cache Mechanism – Service Center uses an asynchronous cache to mitigate etcd outages. It establishes a long‑running watch, performs an initial full sync, and caches resource changes locally for fast access.

These measures improve development efficiency, reduce network traffic, and boost performance via async caching.

Service Center Architecture

The Service Center provides four core modules:

Service Registration & Discovery – Enables topology awareness.

Contract Discovery – Supports multiple contract formats.

RBAC – Role‑based access control for accounts and services.

Service Governance – Policies such as retry, rate‑limit, circuit‑breaker, routing.

Additional capabilities include quota management, alarm reporting, security (encryption, certificates), ID generation (e.g., Snowflake, UUID), and middleware for auditing, tracing, and metrics.

The project is open‑sourced under Apache:

https://github.com/apache/servicecomb-service-center

To support diverse needs, the design emphasizes:

Pluggability – Components can be compiled in as needed.

Heterogeneous Systems – Multiple implementations for functions like auditing.

Algorithm Flexibility – Swap encryption or ID generation algorithms per scenario.

Go Chassis Framework

To accelerate cloud service development, Huawei Cloud created the Go Chassis framework, sharing design concepts with Service Center. It provides a unified framework and standards for rapid development.

Future articles will present hands‑on case studies of Go Chassis.

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.

Backend DevelopmentGoService CenterGo Chassis
Huawei Cloud Developer Alliance
Written by

Huawei Cloud Developer Alliance

The Huawei Cloud Developer Alliance creates a tech sharing platform for developers and partners, gathering Huawei Cloud product knowledge, event updates, expert talks, and more. Together we continuously innovate to build the cloud foundation of an intelligent world.

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.