Recently, an important event happened in the open source community. Dubbo, the most widely used open source service framework for Java developers in the country, quietly restarted maintenance and released 4 maintenance versions in 3 months.

The last time I wrote this post about abandoning Dubbo in favor of the most popular Spring Cloud microservices architecture, I was bombarded with comments saying that Dubbo has been updated again. Of course I’m aware of that, and I’ve been following Dubbo’s progress. A few months ago, there was a rumor in the tech community that Dubbo was being updated again. I went to GitHub for a comment and finally found a positive answer in Dubbo’s Gitter chat room that I was building a team. Although I have some expectations, I do not know how much sincerity Ali has taken out to do this. So I went to GitHub yesterday and found that Ali has released four versions in three months since September, which is still very sincere and worthy of attention.

Introduction of Dubbo

Dubbo is an open source high-performance service framework of Alibaba, which is committed to providing high-performance and transparent RPC remote service invocation solutions and SOA service governance solutions, enabling applications to achieve seamless integration of service output, input functions and Spring framework through high-performance RPC. Dubbo consists of three core parts: remote communication, cluster fault tolerance and automatic discovery.

It provides transparent remote method invocation, enabling remote methods to be called as if they were local methods, requiring simple configuration and without any API intrusion. At the same time, it has soft load balancing and fault tolerance mechanism, can replace the hardware load balancer such as F5 on the Intranet, reduce the cost and reduce the single point. It can realize automatic service registration and discovery, no longer need to write the service provider address, registry based on the interface name query service provider IP address, and can smoothly add or delete service providers.

At the end of 2011, Alibaba opened the Java-based distributed service governance framework Dubbo on GitHub. Since then, it has become the leader of such open source projects in China, and many developers like it. At the same time, many companies have implemented distributed system architecture based on Dubbo in practice. It currently has more than 10,000 forks and stars on GitHub.

Dubbo core features:

  • Remote communication, which provides an abstract encapsulation of a variety of long-connection-based NIO frameworks, including multiple threading models, serialization, and request-response mode of information exchange.
  • Cluster fault tolerance, provides transparent remote procedure call based on interface method, including multi-protocol support, as well as soft load balancing, failure tolerance, address routing, dynamic configuration and other cluster support.
  • Automatic discovery, based on registry directory services, enables service consumers to dynamically find service providers, makes addresses transparent, and allows service providers to smoothly add or subtract machines.

The history of Dubbo

Move to open source

At the end of 2008, we started to plan calls within Ali and developed version 1.0 in early 2009. In April 2010, the 2.0 version was released after the 1.0 version was reconstructed. In October 2011, Alibaba announced that Dubbo would be open source, with the first open source version being Dubbo-2.0.7.

Open source to grow

Since Dubbo became open source, the framework has grown rapidly, with a release every two or three months, with Dubbo 2.1.0 being released on March 14, 2012. This was followed by another period of rapid development, with frequent releases, almost several times a month. Until The release of Dubo-2.4.10 on March 17, 2013, the release was stalled; Dubo-2.4.11 was released on October 30, 2014. A small Bug was fixed, and the release fell into a long stagnation until now.

Development outside Ali

On October 20, 2014, Dangdang forks a version of Ali Dubbo and starts maintenance, named dubbox-2.8.0. It is worth noting that Dangdang extends the Dubbo service framework to support REST-style remote calls, and has updated the corresponding version along with ZooKeepe and Spring. Since then, Dubbox has been maintained in small versions, and the last version dubbox-2.8.4 was released on March 31, 2015.

What has the Dubbo team been doing for three months

At present, the main development of Dubbo is mainly alibaba middleware team. Meanwhile, some colleagues who are interested in Dubbo have been recruited inside Alibaba. Do you want to know when the last version of Dubbo was released since maintenance started this year? It was October 30, 2014, nearly 3 years ago, and Dubbo relied on Jdk, Spring, Zookeeper, Zkclient, etc. So ali’s first step in restoring the update was to adapt the versions of the components that Dubbo relied on so that the base environment on which Dubbo relied was not too out of date, and some serious bugs were Fixed.

Dubbo – 2.5.4/5 version

In September 2017, Alibaba released version dubo-2.4.4/5, updated as follows:

Depend on the upgrade

Rely on The current version Target version Impact point
spring 3.2.16. RELEASE 4.3.10. RELEASE Schema configuration parsing; Http RPC protocol
zookeeper 3.3.3 3.4.9 Common registry
zkclient 0.1 0.10 zookeeper Client tools
curator 1.1.16 2.12.0 Zookeeper client tool
commons-logging 1.1.1 1.2 Log implementation integration
hessian 4.0.6 4.0.38 Hessian RPC protocol
jedis 2.1.0 2.9.0 Redis Registry; Cache RPC
httpclient 4.1.2 4.5.3 Hessian et al. use HTTP connection pooling
validator 1.0.0 1.1.0. The Final Java validation specification
cxf 2.6.1 3.0.14 webservice
jcache 0.4 1.0.0 Jcache specification

In addition to upgrading dependent versions, this version prioritises issues with the highest feedback frequency and impact surface, including graceful downtime, asynchronous calls, dynamic configuration, and MonitorFilter statistics.

Dubbo – 2.5.6 version

In October 2017, Ali released dubo-2.5.6, which Fixed a number of serious bugs.

Publish content

  • Generalized calls to the PojoUtils utility class do not properly handle enumeration types, private fields, and so on
  • When the provider service thread pool is full, the consumer cannot be notified of request rejection exceptions
  • If the returned value payload exceeds the threshold, the payload is repeatedly sent back to the consumer
  • The slf4jLogger correctly prints the actual line number of the log call
  • Delays expose potential concurrency problems, which can lead to multiple ports being occupied by different services
  • Without a provider, the mock logic on the consumer side does not take effect
  • Some minor optimizations: OverrideListener listening logic, provider shutdown heartbeat request, Main startup shutdown logic, etc
  • Some minor bug fixes: dynamic configuration cannot be deleted, Telnet supports generic JSON calls, monitor statistics errors, etc

Dubbo – 2.5.7 version

In November 2017, 12 days ago, Alibaba released Dubo-2.5.7. This time not only fixed a number of major bugs, but also made a small feature improvement.

Publish content

  • Improve the annotation configuration way, repair the community feedback of the old version of the annotation bug
  • Support reading registered IP port from environment variables and binding IP port at startup, support containerized deployment scenarios feedback from the community, and so on
  • Tweak and open some imperfect XML configuration items, such as dump.directory
  • Fixed an issue where zK could not connect during startup, causing the application to block indefinitely
  • Resolve the issue #672 of MonitorService blocking RPC requests on initial calls when ZK cannot connect
  • The internal JSON implementation is marked deprecate to rely on the open source FastJSON implementation
  • The RMI protocol supports attachments
  • Hessian supports EnumSet serialization
  • Community feedback of some small bug fixes and optimization

This release has a lot of content, so there are suggestions for upgrades.

Upgrade please note

  • Note the following incompatibilities exist in this upgrade, which have no impact on core functions and can be avoided by adding dependencies or following configuration rules. This is just a list of potential points of interest, so don’t pay extra attention if you don’t use these features.
  • Some functions, such as AccesslogFilter, Telnet, and Mock, depend on the JSON implementation of the previous version. If these functions are enabled, add FastJSON as a third-party dependency after the upgrade.
  • This update improves the annotation configuration method, while retaining the old annotation configuration code. For example, if the project is moved from the old annotation configuration to 2.5.7, please make sure to remove the old annotation scan configuration and use the new configuration form.
  • During the project startup phase, if zK is not reachable, the behavior of the current version is to continue startup using the registry cache (as determined by the check parameter). MonitorService is invoked for the first time. If zK is unreachable, the current version ignores monitor data upload to avoid blocking the main RPC process.

Focus on

In addition to the 2.5.7 update, the next step is to provide the Dubo-spring-boot-starter starter module in the near future.

This hint shows two things:

  • Dubbo will continue to improve, there will be a lot of new features, so I hope you pay attention.
  • Spring Boot is becoming more and more influential, with all kinds of cool open source software supporting it, including Dubbo now.

What will Dubbo do next?

Here’s what the latest three releases will do, according to Alitech:

  • Prioritize addressing community usage issues and framework flaws, incorporating new features contributed by the community, and addressing document access and incompleteness.
  • Support for Restfule-style service calls, netty HTTP support, and integration with high-performance serialization protocols.
  • Routing function optimization, consumer side asynchronous function optimization, provider side asynchronous call support registry push notification asynchronous, merge processing transformation, etc.

Future plans:

Refactoring dynamic configuration module, dynamic configuration and registry separation, integration of popular open source distributed configuration management framework, service metadata registry and registry separation, rich metadata content for popular Consul ETCD and other registry solutions. Considering the support of openTrace, OAuth2, Metrics, Health, Gateway and other basic components of servitization, the OPS rework of the service governance platform is expected to provide stronger service testing, health check, dynamic service governance and other features in addition to code and UI reconstruction. Dubbo modular, each module can be packaged separately, independently dependent, cluster fuse and automatic fault detection capabilities.

Continue to explore the two major directions of Dubbo framework modernization and internationalization. In terms of modernization, we mainly consider the trend of microservices architecture and containerization, and how Dubbo, as RPC framework, can be well integrated into it and become an indispensable component in its ecosystem. It is emphasized that Dubbo’s future positioning is not to be a comprehensive solution for microservices, but to focus on RPC as an important component of the microservices ecosystem. As for the service governance requirements derived from microservitization, Dubbo will actively adapt to open source solutions and even launch independent open source projects to support them.

How is Dubbo different from Spring Cloud?

Let’s start with a simple feature comparison:

Dubbo Spring Cloud
Service Registry Zookeeper Spring Cloud Netflix Eureka
Service invocation mode RPC REST API
Service monitoring Dubbo-monitor Spring Boot Admin
The circuit breaker imperfect Spring Cloud Netflix Hystrix
The service gateway There is no Spring Cloud Netflix Zuul
Distributed configuration There is no Spring Cloud Config
Service tracking There is no Spring Cloud Sleuth
The message bus There is no Spring Cloud Bus
The data flow There is no Spring Cloud Stream
The batch task There is no Spring Cloud Task

As you can see from the figure above, Dubbo’s capabilities are only part of the Spring Cloud architecture.

This comparison is not fair, Dubbo is a product of the SOA era, which focuses on service invocation, traffic distribution, traffic monitoring, and fusing. Spring Cloud was born in the era of microservice architecture, considering all aspects of microservice governance. In addition, relying on the advantages of Spirng and Spirng Boot, the goals of the two frameworks are inconsistent at the beginning. Dubbo positioning service governance and Spirng Cloud are an ecology.

If you focus only on this aspect of service governance, Dubbo is actually much better than Spring Cloud:

  • Dubbo supports more protocols, such as RMI, Hessian, HTTP, WebService, Thrift, memcached, Redis, etc.
  • Dubbo is more efficient using THE RPC protocol, more than doubling the efficiency of Spring Cloud under extreme stress testing.
  • Dubbo has more powerful background management, Dubbo provides a powerful background management Dubbo Admin, provides routing rules, dynamic configuration, access control, weight adjustment, load balancing and many other powerful functions.
  • It can limit the access permission of a certain IP traffic, set different servers to distribute different traffic weights, and support a variety of algorithms. With these functions, we can do grayscale publishing and failover online. Spring Cloud does not support grayscale publishing and traffic weight and other functions until now.

So Dubbo focuses on service governance; Spring Cloud focuses on the microservice architecture ecosystem.

Will the Dubbo release affect Spring Cloud?

Domestic technologists like to compare Dubbo with Spring Cloud because both are open source frameworks with excellent service governance. Dubbo is focused on service governance and will continue to do so in the future. Spring Cloud focuses on the ecosystem of microservice governance. Because every aspect of microservice governance is its concern, service governance is only one part of the microservice ecosystem. So it’s a safe bet that Dubbo will excel in service governance in the future, while Spring Cloud is unrivalled in microservice governance.

At the same time, according to Dubbo’s latest technology update, Dubbo will also actively embrace open source, embrace new technology. Spring Boot will soon be available in upcoming versions of Dubbo, enabling efficient service invocation while enjoying efficient development. Dubbo has been widely used by Various Internet companies in China. Now Alibaba has taken Dubbo seriously and released a new version and a series of plans, which is good news for the companies using Dubbo and a great joy for the vast number of Developers in China. We are very happy to see that China has a very good open source framework that gives us more choices and better support.

In fact, the two are not necessarily competitive, if properly used can even complement; The other two areas of concern are also inconsistent and therefore have little impact on Spring Cloud.

How to choose?

Perhaps a lot of people are hesitant, in service governance when should choose which framework? If the company has high requirements on efficiency, it is recommended to use Dubbo, which is much more efficient than RPC than HTTP. Dubbo is recommended if the team does not want to make major changes to the technical architecture, and Dubbo can be incorporated into the architecture of the internal system with only minor modifications. But if the technical team likes to challenge new technologies, Spring Cloud is recommended. Spring Cloud architecture has interesting and cool technologies. If companies are choosing microservices to restructure their entire technology infrastructure, Spring Cloud is the best microservices framework out there.

Finally, technology selection is a comprehensive issue, which needs to consider the situation of the team, business development and product characteristics of the company. The coolest technology is not always the best, but the framework that fits your team and your business is the best solution. The development of technology will never end, so we have to keep the glass empty, keep hungry, keep in awe of technology!


Like my article, please follow my official account