Cloud Native 18 min read

How Youzan Cloud Enables Multi‑Language Extensions with Service Mesh

This article analyzes Youzan Cloud's architecture for supporting multi‑language customizations, detailing the distinction between small and large SaaS customers, the role of tool, self‑use, and industry apps, and the service‑mesh‑based RPC framework that abstracts protocols, monitoring, and logging across Java, PHP, Python, and Node.js.

Youzan Coder
Youzan Coder
Youzan Coder
How Youzan Cloud Enables Multi‑Language Extensions with Service Mesh

Background

Youzan is a SaaS platform that provides end‑to‑end services for merchants, covering procurement, store management, product catalog, marketing, orders, logistics, and more. The platform distinguishes between small/medium customers—who have weaker renewal ability but large volume—and large customers—who have strong payment power, longer lifecycles, and extensive customization needs.

Youzan Cloud Purpose

Youzan Cloud is a platform that externalizes customization capabilities, allowing developers to build tool‑type apps, self‑use apps, and industry‑specific solutions. Merchants can purchase these apps from the marketplace to achieve low‑cost, rapid customization of store functionality such as seat selection for ticket sales or custom price calculations.

What "Multi‑Language" Means

In this context, "multi‑language" refers to supporting developers who write applications in various programming languages (Java, PHP, Python, Node.js, etc.) through a set of protocols, frameworks, and infrastructure components, not to internationalization of UI strings.

Remote Call Architecture

To enable cross‑language extensions, the platform adopts a service‑mesh approach. A sidecar component called Tether intercepts all service requests, performs protocol conversion, and forwards calls to the appropriate language runtime.

Technical Choices

Low‑latency RPC that is language‑agnostic.

Automatic service registration and discovery.

Built‑in monitoring, tracing, and logging.

Deployment in Youzan‑managed containers to ensure stability, security, and close proximity to core services.

Internal RPC Evolution

The original Java‑centric Dubbo RPC framework couples tightly with Java semantics and cannot directly serve non‑Java services. Youzan extended Dubbo internally but recognized the need for a language‑neutral solution.

Deployment Architecture

The core domain and the developer‑custom domain run in separate networks that cannot directly access each other. Each domain runs a Kubernetes cluster; when an app is deployed, it registers itself via K8s service discovery. Youzan integrates Istio’s Pilot (renamed Tether) to provide sidecar‑based service discovery and routing.

Service Mesh Practice

When a core service needs to invoke an extension point, the call flow is:

Core service uses Dubbo to call the Bep (extension gateway).

Bep forwards the request to its sidecar, converting Dubbo to HTTP if the target app is non‑Java.

The sidecar routes the request to the appropriate developer‑custom domain sidecar, which looks up the target app via K8s registration and the store‑app authorization mapping.

For Java apps, the original Dubbo protocol is retained; for other languages, HTTP/1.1 or HTTP/2 is used. HTTP/2 was chosen for its standardization, asynchronous nature, high performance, and clear semantics.

Monitoring, Tracing, and Logging

Traditional Dubbo monitoring embeds agents in each application, leading to version‑drift and resource overhead. The new design pushes tracing, metrics, and logging into the sidecar layer, making them language‑agnostic. Applications only need to emit logs via the provided framework; the sidecar forwards them to the centralized SkyNet logging platform.

Application Framework

An application framework abstracts protocol handling and provides a uniform extension‑point API. Developers implement extension points in their language of choice (e.g., Java annotations, PHP facades). The framework parses incoming requests, validates them, and dispatches to the appropriate implementation.

Logging Integration

All languages use a unified logging protocol:

Java applications use SLF4J; the framework supplies a custom SPI that routes logs to SkyNet.

PHP applications use Monolog with a SkynetProcessor and a SocketHandler that sends logs to Rsyslog, which forwards them to SkyNet.

Developers simply write logger.info("message") (or the PHP equivalent) without worrying about transport details.

Planning and Outlook

The roadmap focuses on improving developer experience (e.g., WebIDE, Faas), further unifying the underlying infrastructure for new languages, and expanding extension capabilities so that every workflow step can be customized.

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.

Cloud NativeMicroservicesRPCplatform architectureService MeshMulti-language
Youzan Coder
Written by

Youzan Coder

Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.

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.