All Products
Search
Document Center

Performance Testing:Performance test Spring Cloud microservices

Last Updated:Mar 10, 2026

Cloud-based microservices typically run inside a Virtual Private Cloud (VPC), isolated behind network boundaries. Testing service performance in these environments is difficult -- traditional tools like JMeter must be deployed inside the VPC, which demands complex setup and significant expertise.

Performance Testing Service (PTS) provides a microservices performance testing feature that lets you conduct performance testing on microservices deployed in a VPC. From the PTS console, you configure and run performance tests against Spring Cloud microservices with simple configurations, eliminating the need to set up traditional testing tools like JMeter inside your VPC.

Key concepts

A PTS test scenario consists of several components that work together:

ConceptDescription
ScenarioA complete test configuration that includes target services, stress parameters, and traffic patterns
Spring Cloud nodeA single microservice endpoint under test, defined by its application name, service name, and registry
ControllerLogic that controls execution flow: loops, transactions, or one-time setup
TimerPacing logic between requests that simulates realistic traffic patterns

How these fit together: define a scenario, add one or more Spring Cloud nodes as test targets, optionally attach controllers and timers to shape traffic, configure stress parameters, and run the test.

Prerequisites

Before you begin, make sure you have:

  • Spring Cloud microservices deployed in a VPC

  • Microservices registered with a supported registry (Nacos, Eureka, or Direct-Connect)

  • The registry address and port for your microservices

Step 1: Create a test scenario

  1. Log on to the PTS console.

  2. Choose Performance Test > Create Scenario, then click Spring Cloud.

  3. On the Microservice Scenario page, specify:

    • A scenario name

    • The source of the tested applications

    • The region where your microservices are deployed

    • The microservices namespace

  4. On the Scenario Settings tab, click + Add Spring Cloud Node to add a test node.

Step 2: Configure the test node

Click the expand icon on the right side of the node to expand it, then configure the following settings:

ParameterDescriptionExample
Application NameThe spring.application.name value of your SpringBoot applicationdemo-pts-service-provider
Service nameThe Spring Cloud service namedemo-service
Registry typeThe service registry type: Eureka, Direct-Connect, or NacosDirect-Connect
NodeThe registry address in http://[ip]:[port] or [ip]:[port] formathttp://172.16.0.0:8080
Access PathThe request URL path/demo
Request MethodGET, POST, PUT, or DELETE. You must also define headers on the Header Definition tab.GET
Timeout (ms)Maximum wait time for a response. Default: 1000 (1 second). Keep this below 5000 ms for production services.1000

Registry address for Microservices Engine (MSE) users

The registry address format depends on whether you configured a namespace:

  • No namespace configured: Enter the registry address directly. The default namespace DEFAULT_GROUP is used.

      XXX.nacos-ans.mse.aliyuncs.com:8848
  • Namespace configured: Append the namespace ID as a query parameter.

      XXX.nacos-ans.mse.aliyuncs.com:8848?namespaceId=abc

Headers and body

Configure request headers on the Header Definition tab. For details, see Header definition.

Configure the request body on the Body Definition tab. For details, see Body definition.

Note

POST and PUT requests require a request body. Configure it on the Body Definition tab before running the test.

Output parameters

Configure output parameters on the Output Parameter Definition tab of a session. For details, see Output parameters.

Check points

Define pass/fail assertions on the Check Point (Assertion) tab. For details, see Check point (assertion).

Step 3: Add controllers and timers (optional)

Controllers and timers let you simulate realistic traffic patterns. Add them from the Scenario Settings tab.

Controllers

Click Add Controller and select a controller type:

ControllerWhat it doesConfiguration
Loop controllerRepeats a test node a specified number of times. Click the settings icon next to the controller, select the node, and set the loop count.Node to loop, loop count
Transaction controllerGroups multiple test nodes into a single transaction. See configuration options below.Generate parent sample, include timer duration
Only once controllerRuns nodes inside it exactly once.Nodes to include

Transaction controller options:

  • Generate parent sample: When enabled, individual node results are aggregated under the transaction. When disabled, both the transaction summary and individual node results appear in the report.

  • Include duration of timer and pre-post processors in the sample: When enabled, the transaction's average response time includes timers and pre/post-processors. When disabled, only test node response times are counted.

Timers

Click Add Timer and select a timer type:

TimerWhat it doesKey parameters
Constant timerAdds a fixed pause between requestsPause duration (ms)
Synchronous timerHolds requests until a target number of virtual users accumulates, then releases them simultaneouslyTimeout, Number of Simulated Users
Unified random timerAdds a random pause with equal probability across the rangeConstant Delay Offset (fixed pause) + Random Delay (max random pause)
Gaussian timerAdds a random pause following a normal distributionConstant Delay Offset + Random Delay
Fixed throughput timerControls request rate to match a target throughputThroughput value and scope: Only the current thread, All active threads, Active threads in the current link, Globally active thread, or Globally active threads in the current link

Step 4: Configure stress parameters

Configure how PTS generates load against your microservices:

ParameterDescription
Source of StressInternet: Stress nodes are distributed globally; IP addresses are allocated based on load volume. Alibaba Cloud virtual private clouds (VPCs): Stress traffic stays within the VPC in the same region as your services. See Stress testing in Alibaba Cloud VPCs.
Stress ModeVirtual user mode: Simulates concurrent users to determine how many your system supports (client-side perspective). Requests per second (RPS) mode: Sets a target throughput to measure server-side capacity directly.
Auto Incremental ModeManual Adjustment: Maintains a fixed number of virtual users throughout the test. The corresponding stress prediction chart is a flat line. Tiered Increment: Ramps virtual users in steps -- each step adds a percentage of the total, holds for a set duration, then increases again until the maximum is reached. The corresponding stress prediction chart is a graph in the step form.
Max VUsThe maximum number of virtual users for the entire scenario (virtual user mode only).
Increment PercentageThe percentage of Max VUs added at each step (tiered increment mode only).
Single Load Level DurationHow long each step lasts. Minimum: 1 minute. Set this long enough to detect issues at each load level.
Total Test DurationCalculated as: Single Load Level Duration / Incremental magnitude x 1.1 (rounded up). Maximum: 24 hours.
Number of Specified IP AddressesThe number of IP addresses used to generate stress traffic. See Specify the number of IP addresses applying stress.
Region-specific TrafficEnable this to distribute stress traffic across specific regions, simulating geographically distributed users. See Custom traffic.

Choose the right stress mode

ModeBest forPerspective
Virtual user modeDetermining how many concurrent users your system handlesClient-side
RPS modeMeasuring maximum throughput without estimating user-to-request ratiosServer-side

When to use each mode:

  • Use Virtual user mode when you need to validate capacity for a known number of concurrent users, such as preparing for a product launch or traffic spike.

  • Use RPS mode when you want to directly measure your service's throughput ceiling, without converting between concurrent users and requests per second.

Step 5: Run the test

Click Save and Start. On the Note page, select Execute Now and The test is permitted and complies with the applicable laws and regulations., then click Start.

To validate your configuration before a full run, click Debug. For details, see Debug scenarios.

Step 6: Analyze test results

After the test completes, PTS generates a report with the following sections:

Report sectionWhat it shows
Scenario metricsOverall throughput, error rates, and response times
Business detailsPer-node performance breakdown
Monitoring detailsResource utilization during the test
API sampling logsIndividual request and response samples

Use these results to identify bottlenecks: high error rates may indicate capacity limits, while rising response times under increasing load reveal performance degradation points.

For a walkthrough of the report, see View PTS stress testing reports.