All Products
Search
Document Center

Enterprise Distributed Application Service:Migrate a multi-application Spring Cloud cluster to EDAS

Last Updated:Mar 12, 2026

This guide walks you through migrating a multi-application Spring Cloud cluster to Enterprise Distributed Application Service (EDAS) without service downtime. The dual registration and dual subscription approach keeps migrated and non-migrated applications communicating throughout the process.

This guide applies to Spring Cloud clusters already deployed on Alibaba Cloud. If your cluster is not yet on Alibaba Cloud, submit a ticket or contact EDAS technical support for a complete migration solution.

Note

If your cluster is not in production or downtime is acceptable, skip this guide. Develop applications locally and deploy them directly to EDAS. See Implement service registration and discovery.

Why migrate to EDAS

EDAS replaces the operational overhead of self-managed Spring Cloud infrastructure with a managed platform. After migration:

  • Flexible deployment -- Configure startup parameters, track deployment progress visually, and use graceful service connection and disconnection to avoid dropped requests.

  • Built-in service discovery -- EDAS provides service discovery and configuration management in its commercial release, replacing self-managed Eureka, ZooKeeper, or Consul.

  • Centralized service administration -- Query published and consumed services from the EDAS console. In addition to instance information query, access microservice traces, system call topology, and slow SQL analysis.

  • Auto scaling -- Dynamically scale application instances in or out based on traffic.

  • Phased releases -- Run end-to-end phased releases for small-scale validation before rolling out updates to all instances.

  • Throttling and degradation -- Apply throttling and service degradation to maintain application stability under heavy load.

Choose a migration method

EDAS supports two migration methods. Both preserve service continuity.

Method How it works
Registry switching Use Spring Cloud Alibaba to switch the original service registry to Nacos. Develop applications and deploy them to EDAS, then switch traffic by configuring the SLB instance and domain name.
Dual registration and dual subscription Access both the original service registry and the EDAS service registry during migration, enabling mutual calling between migrated and non-migrated applications.

If you choose registry switching, follow the standard setup in Implement service registration and discovery. The rest of this guide covers dual registration and dual subscription.

How dual registration works

During migration, each application registers with both the original service registry and the EDAS registry (Nacos). This means:

  • Migrated applications discover non-migrated ones through the original registry.

  • Non-migrated applications discover migrated ones the same way.

  • Both groups call each other without interruption.

  • You can view the consumer service call list and track migration progress in real time.

  • Applications restart only once during the entire migration process. After that, you can dynamically adjust registration and subscription policies without restarting.

After all applications are migrated, remove the original registry configuration and the migration dependency.

Migration overview

The migration consists of three phases:

  1. Migrate applications (required) -- Stateless applications are migrated first, one at a time.

  2. Migrate the Server Load Balancer (SLB) instance or update DNS (optional) -- Point traffic to the new deployment.

  3. Migrate storage and message queues (optional) -- Only needed if your applications are not already using Alibaba Cloud services like ApsaraDB RDS and Message Queue.

This guide focuses on phase 1.

Phase 1: Migrate applications

Step 1: Select the first application

Start with a downstream provider -- an application that other services call but that itself has few or no upstream dependencies. If your call chain is too complex to identify such an application, pick any application and proceed.

Step 2: Add dependencies and update configuration

Make the following changes to the application before deploying it to EDAS.

2a. Add the Nacos discovery dependency

Add spring-cloud-starter-alibaba-nacos-discovery to your pom.xml file.

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
    <version>{Version}</version>
</dependency>

Replace {Version} with the Spring Cloud Alibaba version compatible with your Spring Boot version.

2b. Configure the Nacos server address

Add the following properties to application.properties:

spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
ribbon.nacos.enabled=false

Setting ribbon.nacos.enabled to false prevents Nacos from overriding the Ribbon server list, which is necessary for the dual-subscription setup.

2c. Add the migration starter

Spring Cloud allows only one service registry by default. The edas-sc-migration-starter dependency removes this restriction and enables dual registration.

<dependency>
    <groupId>com.alibaba.edas</groupId>
    <artifactId>edas-sc-migration-starter</artifactId>
    <version>1.0.5</version>
</dependency>

2d. Configure Ribbon for multi-registry subscription

To aggregate service instances from multiple registries, set MigrationRibbonConfiguration as the default Ribbon configuration in your application's main class.

Before:

@SpringBootApplication
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }
}

After:

@SpringBootApplication
@RibbonClients(defaultConfiguration = MigrationRibbonConfiguration.class)
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }
}

This single annotation is the only code change required.

Step 3: Deploy to EDAS

Deploy the modified application to an ECS cluster or an ACK cluster. Use the EDAS console or CLI tools.

Important considerations:

  • Reuse existing ECS instances to save costs by importing them into EDAS. See Create an ECS cluster in the EDAS console.

  • If you create new ECS instances, place them in the same Virtual Private Cloud (VPC) as existing applications to maintain internal network connectivity. See Resource management overview.

  • Update IP address whitelists in databases, caches, and message queues to include the new ECS instance IPs.

Step 4: Verify the migration

After deployment, verify that the migrated application works correctly:

  1. Check service health -- Confirm that the application starts successfully and processes requests as expected.

  2. Inspect the Ribbon server list -- If Spring Boot Actuator is enabled, query the migration endpoint to see which registries the application subscribes to:

    • Spring Boot 1.x: http://<ip>:<port>/migration_server_list

    • Spring Boot 2.x: http://<ip>:<port>/actuator/migration-server-list

    In the response, the serverGroup field in metaInfo identifies the source registry for each service instance (for example, eureka or nacos).

Step 5: Migrate remaining applications

Repeat Steps 2 through 4 for each remaining application in the cluster.

Phase 2: Migrate the SLB instance or update DNS (optional)

After all applications are migrated, update network routing:

  • If an SLB instance was used before migration, reuse it.

  • If no SLB instance was used, create one and bind it to your entry-point application (for example, API Gateway).

  • Domain name configuration:

    • If the SLB instance is reused, no DNS changes are needed.

    • If a new SLB instance is created, update DNS to point to the new SLB instance and remove the old one. See Change DNS servers for a domain name.

Phase 3: Migrate storage and message queues (optional)

If your applications already use Alibaba Cloud services such as ApsaraDB RDS and Message Queue, no storage or message queue migration is needed.

If your applications are not on Alibaba Cloud, contact EDAS technical support for a complete migration plan.

Dynamically adjust registration and subscription policies

During migration, you can adjust which registries an application registers with or subscribes to -- without restarting. Use the EDAS configuration management feature, Spring Cloud Config, or Nacos Config to update the following properties at runtime.

Control which registries the application subscribes to

By default, the application subscribes to all registries and aggregates the results.

To subscribe to specific registries only, set spring.cloud.edas.migration.subscribes:

# Subscribe to both Eureka and Nacos
spring.cloud.edas.migration.subscribes=nacos,eureka

# Subscribe to Nacos only
spring.cloud.edas.migration.subscribes=nacos

Control which registries the application registers with

By default, the application registers with all registries.

To stop registering with specific registries, set spring.cloud.edas.migration.registry.excludes:

# Register with all registries (default)
spring.cloud.edas.migration.registry.excludes=

# Stop registering with Eureka
spring.cloud.edas.migration.registry.excludes=eureka

# Stop registering with both Nacos and Eureka
spring.cloud.edas.migration.registry.excludes=nacos,eureka
Note

Tip: If you use Spring Cloud Config, see the open source documentation. For Nacos Config setup instructions, see Manage application configurations.

Post-migration cleanup

After all applications are running on EDAS, remove the migration-specific configuration:

  1. Delete the edas-sc-migration-starter dependency from each application's pom.xml (or build.gradle).

  2. Remove the @RibbonClients(defaultConfiguration = MigrationRibbonConfiguration.class) annotation from the main class.

  3. Remove the original service registry dependency and configuration (for example, Eureka or Consul client settings).

  4. Remove ribbon.nacos.enabled=false from application.properties.

  5. Restart applications in batches during off-peak hours.

Note

The edas-sc-migration-starter does not affect service stability if left in place temporarily. However, it limits the load balancing behavior of Ribbon, so remove it after migration is complete.

Demo project

EDAS provides a sample project that demonstrates dual registration and dual subscription. Download the project and follow the included README to run it locally.