Open-source project
sofastack/sofa-registry avatar
sofastack/sofa-registry

SOFARegistry: Ant Group's service registry, now open source

SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.

660 stars251 forksJavaApache-2.0

At a glance

What is it?
SOFARegistry is the Java service registry that grew out of Taobao's ConfigServer inside Ant Group, built on an AP architecture with millisecond push notifications over SOFABolt, and it ships the governance APIs, multi-cluster control and data management that a large internal platform needs. It suits teams running Java microservices who want a registry with a documented operations surface, and it comes with an unusual requirement: you must supply your own management tokens.
Who is it for?
SOFARegistry is worth evaluating for Java teams that want a registry with real push semantics, a multi-cluster data plane and a documented operations manual, especially those already shaped by Ant Group's stack. It is the wrong fit for a Kubernetes-native shop that gets service discovery from the API server, and for a team unwilling to run the Meta and Session server processes with the secret management that its management APIs require.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What SOFARegistry is: ConfigServer grown into a platform

SOFARegistry is described as a production-level, low-latency, high-availability registry system for micro-service registration, powered by Ant Group. The history in the README is the interesting part of the description: it originated from Taobao's ConfigServer, and over the past decade, as Ant Group's business grew, its registry architecture evolved to its sixth generation.

That lineage explains most of the design. A registry that serves an organisation with tens of thousands of internal services is not a service list with a lookup endpoint; it is a distributed system with data partitioning, leader election, session management and push dissemination, and every one of those pieces has a source-code analysis page in the documentation.

The current position is stated as: it fully supports Ant Group's internal services, and also serves numerous partners through Ant Financial Technology, while maintaining compatibility with the open-source ecosystem. The acknowledgements section names the two foundations: ConfigServer was created by Bi Xuan and laid the groundwork, and the implementation references portions of code from Netflix's Eureka, with thanks to Netflix for open sourcing it.

The functionality list in the README is short and operational. Service publishing and subscription, real-time notifications when a service changes, enhanced service governance API endpoints, a multi-tier architecture for traffic and data that handles massive connections and large-scale datasets, high data availability through facility replication, millisecond-level notifications for registration and deregistration over the SOFABolt communication framework, and availability under network partitions thanks to the AP architecture.

Two of those phrases carry the engineering argument. Availability under network partition is what an AP architecture buys you, and millisecond-level push is what turns a registry from a polling system into an event system.

Why AP architecture and SOFABolt matter for a registry

The registry's central design decision is the one the README names first and returns to at the end of the functionality list: SOFARegistry adopts an AP architecture, and that guarantees availability under network partitions.

For a service registry, that is a deliberate trade rather than a default. A registry that has to stay available during a partition cannot guarantee that every subscriber has a perfectly consistent view of the service list at every moment. What it can guarantee is that the registry side keeps serving, that clients keep their last known good view, and that the inconsistency is resolved when the partition heals. A CP design would instead block writes during a partition, which for a registry that sits on the critical path of every service call is a much worse failure mode.

The second decision is the push path. SOFARegistry uses SOFABolt, Alipay's own communication framework, for its notification channel, and the README claims millisecond-level notifications for service registration and deregistration. The practical consequence for a client is that a service instance appearing or disappearing is pushed to consumers rather than discovered on the next poll, so a rollout propagates through the mesh in the time it takes the network to deliver a message rather than in the time it takes a poll interval to elapse.

The documentation treats both mechanisms as separate subjects worth analysing. There are dedicated pages for the publish-subscribe push path, the registry meta leader election, the SlotTable, the data inverted index, data table monitoring, non-destructive operations, push latency tracing, the push switch mechanism and communication data compression. A project that publishes source-code analyses of its own internals is making a claim about how much of the behaviour you can inspect, which matters more for a registry than for most libraries.

Building and running: JDK and Maven floors, then a container image

The requirements are stated with unusual precision, and they are the first thing to check before anything else.

Compilation requires JDK 8 or later and Maven 3.2.5 or later. The runtime environment requires JDK 6 or later, with JDK 8 or later for a server-side deployment. And the README adds a warning in bold: JDK 8 is recommended, because JDK 16 has not been tested and may have compatibility issues.

That warning is the kind of line that saves a deployment. A registry is infrastructure, and infrastructure that runs on an untested JDK combination is a bad bet, so the honest guidance is to stay on JDK 8 for the server processes unless you have verified the combination yourself. The repository also carries CI configuration for several systems, with unit test and integration test workflows in GitHub Actions alongside Travis and AppVeyor files, and a codecov configuration with a coverage badge in the README.

For packaging, the Makefile is small and does two things that matter. The proto target regenerates the Java classes from the protocol definitions with protoc, using the proto files under server/common/model/src/main/resources/proto, and the comment pins the protoc version to 3.5.1. The image targets build and push a container image:

bash
	docker build . -f docker/Dockerfile -t  sofaregistry/sofaregistry:$(VERSION)

The VERSION variable is read from a VERSION file at the root of the repository, so the image tag follows the project's own version rather than a hand-written number, and the matching push target publishes it as sofaregistry/sofaregistry with the same tag.

Beyond that, the repository is laid out the way you would expect for a Java service: pom.xml at the root, client/, core/, server/, test/ and tools/ modules, a docker/ directory, a create_table.sql for the data schema, a ruleset.xml, and separate documentation files for the administration API and for session auto-batching duration.

Management API authentication: bring your own token

The most operationally important section of the README is the one about management API authentication, and it is worth reading closely before an upgrade.

A set of endpoints requires a deployment-provided token. These are the multi-cluster configuration and datum-removal APIs, POST /shutdown/update and POST /api/emergency/shutdown, the push-efficiency configuration APIs, and the two multi-cluster queries GET /api/multi/cluster/query and queryAll.

The token can be injected in two ways. The first is the SOFA_REGISTRY_MANAGEMENT_AUTH_TOKEN environment variable, set in the Meta and Session server processes or in the integration process. The second is the JVM system property sofa.registry.management.auth-token, which takes precedence over the environment variable even when it is explicitly empty, and which is read directly from the JVM and not from application.properties.

The consequences of that are specific. If the configuration is missing or blank, access to these APIs is disabled, and there is no built-in token to fall back on. The existing POST APIs keep their token form parameter, while the two multi-cluster GET queries and the push-efficiency GET APIs take the token in an HTTP header instead of a URL parameter, which keeps the secret out of access logs and proxy logs.

The upgrade guidance is unambiguous: provision fresh secrets and update management clients before upgrading, do not reuse the former source-code token, keep secrets out of source control and logs, use the deployment's secret manager, rotate each affected process with a restart when using environment variables, and use separate secrets across deployments and trust boundaries. The README also notes that this configuration does not configure the separate AuthRestFilter mechanism used by other Meta management APIs, so a deployment has two mechanisms to reason about.

The existence of a former source-code token is the sort of thing a reader should note: an upstream default that was baked into the code has been replaced by a requirement that each deployment provides its own.

Documentation: a quick start, an operations manual and nine analyses of the internals

The documentation index is organised by audience, which tells you what the project expects from you.

There is a Quick Start for standing up a server, a Developer Guide that points at the Java SDK for application-side integration, an Operations Manual for deployment, a Release Notes page and a Roadmap. Those five cover the lifecycle of running the thing.

Then there is the source code analysis section, and it is the most substantial part of the list. The pages cover the publish-subscribe push mechanism, registry meta leader election, the SlotTable, the data inverted index, data table monitoring, non-destructive operations and the ability to run them, push latency tracing, the push switch mechanism, and communication data compression.

Read as a group, that list describes a system with a data plane and a control plane, a partitioned data store with an inverted index, a leader-elected meta server, and a push channel with its own latency instrumentation and a switch that can stop it. The non-destructive operations page in particular suggests that data changes can be applied without taking the cluster down, which is a capability most registries of this generation do not have.

The repository holds some of this documentation alongside the code: Session-Auto-Batching-Duration.md, ADMIN_API_DOCUMENTATION.md and SECURITY.md sit at the root, with the rest published on the project site under sofastack.tech.

Maintenance, releases and where SOFARegistry is the wrong choice

The licence is Apache-2.0, with the licence file in the repository root.

On maintenance, the facts are mixed in a way an adopter needs to read carefully. The last push to the repository was on 2026-10-20 and the repository is not archived, so the code is still being worked on. The published releases, however, are much older: v6.1.9 from 2023-02-09, v6.1.4 from 2021-12-17 and v5.4.2 from 2020-03-27. The default branch is master, and the repository carries a VERSION file used by the image build, so the version in a container image follows the branch rather than the latest tag unless you pin one.

The consequence is that you are choosing between an old tag with a long track record and a moving branch with three-year-old release artefacts. For a registry that has to interoperate with client libraries, matching versions matters, and the mismatch between the newest release and the current branch is exactly the kind of detail to check before deploying.

The first wrong-tool case is a Kubernetes-native shop. If your service discovery comes from the API server and your configuration from ConfigMaps or a CRD, running a second registry is duplicating infrastructure that already exists for you. SOFARegistry's multi-tier architecture and data management make sense at the scale of a large internal platform, not in a cluster of ten services.

The second wrong case is a team that does not want to run Meta and Session server processes with a secrets pipeline behind them. The management APIs are the way you inspect and repair a registry at scale, and they need a token provisioned, rotated and injected per process. Running the registry without that discipline is worse than not running it.

The third is a stack that is not Java. The README documents a Java SDK, and the codebase is a Maven multi-module Java project with protocol definitions compiled by protoc.

The realistic alternative is one of the conventional open source registries, which trade the multi-cluster data plane and the non-destructive operations for a much smaller operational footprint and a familiar client model. The difference in approach is that SOFARegistry is built as an operations platform, with a meta server, leader election, data partitioning and a facility replication story, rather than as a discovery library with a storage backend, and it is the operations surface that you are really choosing.

Editorial conclusion

SOFARegistry is worth evaluating for Java teams that want a registry with real push semantics, a multi-cluster data plane and a documented operations manual, especially those already shaped by Ant Group's stack. It is the wrong fit for a Kubernetes-native shop that gets service discovery from the API server, and for a team unwilling to run the Meta and Session server processes with the secret management that its management APIs require. Verify first that your JDK version matches the supported range, because JDK 16 is explicitly untested, that you can provision and rotate a management auth token per deployment, and that the release you pick has the client and server versions you intend to run in step.

Frequently asked questions

What are the JDK and Maven requirements for SOFARegistry?

Compilation requires JDK 8 or later and Maven 3.2.5 or later, and the runtime environment requires JDK 6 or later, with JDK 8 or later for server-side deployment. The README recommends JDK 8 and warns that JDK 16 has not been tested and may have compatibility issues.

How do I authenticate the SOFARegistry management APIs?

You provide a deployment token yourself, either through the SOFA_REGISTRY_MANAGEMENT_AUTH_TOKEN environment variable in the Meta and Session server processes, or through the JVM system property sofa.registry.management.auth-token, which takes precedence even when explicitly empty and is read from the JVM rather than from application.properties. Missing or blank configuration disables those APIs, and there is no built-in token.

Which endpoints require the management token?

The multi-cluster configuration and datum-removal APIs, including POST /shutdown/update and POST /api/emergency/shutdown, the push-efficiency configuration APIs, and the two multi-cluster queries GET /api/multi/cluster/query and queryAll. Existing POST APIs keep their token form parameter, while those GET queries and the push-efficiency GET APIs use the token HTTP header instead of a URL parameter.

What happens to the old built-in token during an upgrade?

The README says to provision fresh secrets and update management clients before upgrading, and not to reuse the former source-code token. Secrets should be kept out of source control and logs, taken from the deployment secret manager, rotated per process with a restart when using environment variables, and separate across deployments and trust boundaries.

Is SOFARegistry related to Eureka and Netflix?

The implementation references portions of code from Netflix's Eureka, with the README acknowledging Netflix for open sourcing it. The project itself evolved from Alibaba's internal ConfigServer, created by Bi Xuan, which laid the foundation for SOFARegistry.

How does SOFARegistry behave during a network partition?

SOFARegistry adopts an AP architecture, which the README says guarantees availability under network partitions, and it delivers millisecond-level notifications for registration and deregistration over the SOFABolt communication framework.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. sofastack/sofa-registry on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sofastack-sofa-registry.svg)](https://hysenlabs.com/projects/sofastack-sofa-registry)

Was this useful?