RocketMQ: HA Design

Decisions decisions

When any messaging system sends messages, there will be errors. Even though the name servers do check the health of brokers beforehand, there is always delay. Plus, a network outage can happen during the transmission. But the handling of errors can be different.

The CAP Theorem is a fundamental theorem in distributed systems that states that any distributed system can have, at most, two of the following three properties: Consistency, Availability, and Partition tolerance. The following diagram shows the tradeoffs:

Spring Cloud Alibaba Sentinel’s Integration With Feign

@FeignClient(name = "service-provider")
public interface EchoService {
  @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)
  String echo(@PathVariable("str") String str);
}

What Is Sentinel

Sentinel is an open source circuit breaker. It can be part of Spring Cloud Alibaba or as an individual package.

What Is Feign

Feign is a Java to HTTP client binder. It’s aiming to simplify the REST API process.

RocketMQ: HA Implementation

Introduction

When we talk about HA, normally people think about the failover mechanism. However, making the cluster available to messages is also considered HA. And to a certain extent, I think it is more important than just making the brokers available. After all, users can and will feel the impact of this availability.

Code Snippets

Here is the scenario:

Nacos as a Config Server

Config servers are widely used in microservices architectures as placeholders for configurations. They also provide a centralized repository for users to manage configs for multiple applications.

Today, we are going to look at an example of how to use Nacos as a config server with Spring Cloud for Alibaba. The example is a Spring Boot application, running a Nacos server locally.

Deploy Nacos on a Kubernetes cluster

Recently, a demo was given on how to deploy a Nacos service on K8s. In this article, we’ll provide more context on the demo. Hopefully, it will be helpful when you are trying it out.

Nacos

Nacos is an open source project offered by Alibaba. It supports two major use cases, namely, service registry and config service. Even though Nacos is written in Java, it is designed to be a general purpose service registry and config server.

RSocket vs. gRPC Benchmark

Almost every time I present RSocket to an audience, there will be someone asking the question: "How does RSocket compare to gRPC?"

Today we are going to find out.

Dubbo 3.0 Preview: Support for Reactive Programming

Background

Dubbo is graduating from the Apache foundation! And we are planning some major release milestones. Release 3.0 is on the way. Since there will be many new features in 3.0, we want to make sure they are up to the expectation of the community. We are now offering the 3.0.0-SNAPSHOT version. It has many preview features of the 3.0 release. In this article, I’ll introduce one of the major enhancements: the support for reactive programming.

RSocket

Reactive programming enables developers to write more efficient applications, especially in a distributed architecture. The community has been asking for this feature for a long time and now we are delivering!