Cloud Native 8 min read

Unlock Nacos 3.0: New Architecture, Deployment Modes, and Embedded Integration

Version 3.0 of Nacos introduces a decoupled architecture with independent console deployment, multiple port configurations, three flexible deployment modes (merged, server, console), a modular bootstrap startup engine, and an embedded integration approach that simplifies microservice governance while enhancing security and performance.

macrozheng
macrozheng
macrozheng
Unlock Nacos 3.0: New Architecture, Deployment Modes, and Embedded Integration

Architecture Upgrade: Decoupling and Security Improvements

Nacos 3.0 separates the console from the server, improving system architecture and security.

Port Separation: Dual Access Mechanism

New independent console port (8080) and service API port (8848) replace the old single port.

Traditional access : IP:8848/nacos (2.x)

New access : IP:8080/nacos (3.0)

This design isolates the management UI (8080) from the service API (8848), preventing unauthorized access.

Three Deployment Modes

Nacos 3.0 offers merged, server, and console deployment modes.

MERGED

<code># startup parameter merged  # default, no explicit specification</code>

Single process provides both service registry (8848) and management UI (8080).

SERVER

<code># startup parameter server</code>

API‑only mode without UI, suitable for clustered high‑availability deployments.

CONSOLE

<code># startup parameter console</code>

Starts only the management UI and can connect to remote Nacos clusters for multi‑environment management.

New Bootstrap Startup Engine

Unified entry point : All components are driven by the bootstrap module, reducing coupling.

Multi‑stage startup : Core → Server → Console.

Modular loading : On‑demand component activation for efficient resource use.

Embedded Nacos Integration for Microservices

The modular architecture allows Nacos to be embedded directly into Spring Boot applications, eliminating the need for a separate server.

Three Steps to Embed Nacos

Add Dependencies

<code><dependencies>
    <!-- Nacos integration package -->
    <dependency>
        <groupId>io.github.pig-mesh.nacos</groupId>
        <artifactId>nacos-console</artifactId>
        <version>3.0.0</version>
    </dependency>
    <dependency>
        <groupId>io.github.pig-mesh.nacos</groupId>
        <artifactId>nacos-server</artifactId>
        <version>3.0.0</version>
    </dependency>
</dependencies></code>

Configure Application Properties

Set required parameters in

application.properties

(refer to the official template for over 100 options).

Create Efficient Startup Class

<code>public class NacosApplication {
    public static void main(String[] args) {
        // standalone mode
        System.setProperty(ConfigConstants.STANDALONE_MODE, "true");
        // deployment type (merged/server/console)
        String type = System.getProperty(Constants.NACOS_DEPLOYMENT_TYPE,
                Constants.NACOS_DEPLOYMENT_TYPE_MERGED);
        DeploymentType deploymentType = DeploymentType.getType(type);
        EnvUtil.setDeploymentType(deploymentType);

        // Phase 1: core services
        NacosStartUpManager.start(NacosStartUp.CORE_START_UP_PHASE);
        ConfigurableApplicationContext coreContext =
                new SpringApplicationBuilder(NacosServerBasicApplication.class)
                        .web(WebApplicationType.NONE).run(args);

        // Phase 2: server web
        NacosStartUpManager.start(NacosStartUp.WEB_START_UP_PHASE);
        ConfigurableApplicationContext serverWebContext =
                new SpringApplicationBuilder(NacosServerWebApplication.class)
                        .parent(coreContext).run(args);

        // Phase 3: console
        NacosStartUpManager.start(NacosStartUp.CONSOLE_START_UP_PHASE);
        ConfigurableApplicationContext consoleContext =
                new SpringApplicationBuilder(NacosConsole.class)
                        .parent(coreContext).run(args);
    }
}</code>

After launching, the embedded console is reachable at

http://localhost:8080/nacos

, providing a one‑stop service governance experience.

Conclusion

Nacos 3.0’s decoupled architecture, modular startup, and embedded integration dramatically improve flexibility, security, and ease of use for both large‑scale enterprise deployments and lightweight development environments.

Nacos architecture diagram
Nacos architecture diagram
Cloud NativemicroservicesDeploymentService DiscoveryNacosSpring BootBootstrap
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.