New features

New features of Dubbo-go 3.0

star

1. Triple Protocol

1.1 Overview

img

  • Communication level

    The Triple protocol, also known as the Dubbo3 protocol, is an extended protocol based on HTTP2 + gRPC, which adds specific fields and logical enhancements, ensuring interoperability with the native gRPC protocol. On this basis, the Triple new protocol will more natively support Dubbo service governance capabilities and support streaming RPC calls.

    In simple terms, it can be understood as Triple = gRPC + Dubbo.

  • Serialization

    The Triple protocol uses an efficient PB serialization method and adds extensible support for serialization protocols.

  • User development habits:

    Triple services require pre-defined .proto files before development, which facilitates Go developers who prefer to define IDL before coding. This differs from the Dubbo-go 1.x version that defines JavaClassName to describe interfaces in line with Java programming habits.

  • Cross-language interoperability:

    It can achieve cross-language interoperability with Dubbo-Java.

2. Application-level Service Discovery

2.1 Introduction

img

During the service registration phase, server instances register application-level information, mainly mapping application names to instance IPs in the registration center. In the service discovery phase, client instances obtain the required service instance IP through the registration center. The service introspection phase follows, where the process of service introspection involves obtaining interface information through application information. As shown in the figure, there are two modes:

  1. remote mode: obtaining application to interface metadata mapping through a metadata center (e.g., zk).
  2. local mode: obtaining application to interface metadata mapping directly from the server (initiating an RPC call to the Metadata Service through the Dubbo protocol).

After service introspection, the client officially initiates a call to the corresponding instance. The most obvious benefit of this approach is the reduced data volume for the registration center, which only retains application-level data.

When using Dubbo-go 3.0’s application-level service discovery capabilities, users can follow the examples to configure the service introspection mode and metadata center information directly in the configuration file, add dependencies, and enable application-level service discovery.

2.2 Article on Application-level Service Discovery

Application-level service discovery analysis

3. Mesh Routing Rules

Users can define routing files:

virtual_service.yaml

img

and dist_rule.yml

img

The framework can forward traffic based on routing files for specific requests.

Official Alibaba Cloud introduction article: “Dubbo 3.0 - Opening the Next Generation of Cloud-native Microservices”

Last modified September 30, 2024: Translate (e96744e441)