Skip to content
云原生开源开发者沙龙 | AI 应用工程化专场杭州站邀您参会Know more

Nacos service discovery performance test report

Test purposes

Main understanding Nacos service discovery performance load and capacity, to help us better manage Nacos performance quality, help users use of assessment Nacos system load faster.

Testing tools

We use the research of PAS performance evaluation service platform for pressure measurement, the principle is based on the use of JMeter engine, the use of PAS to automatically generate the JMeter scripts, intelligent pressure measurement.

IMAGE

Test environment

1.environment

indicatorsparameter
machineCPU 16 nuclear, 32G memory
cluster size3 nodes
Nacos version1.0.0

2.Set the launch parameters

/opt/taobao/java/bin/java -server
-Xms20g
-Xmx20g
-Xmn10g -XX:MetaspaceSize=128m
-XX:MaxMetaspaceSize=320m
-XX:-OmitStackTraceInFastThrow
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/home/admin/nacos/logs/java_heapdump.hprof
-XX:-UseLargePages
-Djava.ext.dirs=/opt/taobao/java/jre/lib/ext:/opt/taobao/java/lib/ext:/home/admin/nacos/plugi
ns/cmdb:/home/admin/nacos/plugins/mysql -Xloggc:/home/admin/nacos/logs/nacos_gc.log
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
-Dnacos.home=/home/admin/nacos -jar /home/admin/nacos/target/nacos-server.jar
--spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/home/admin/naco
s/conf/ --logging.config=/home/admin/nacos/conf/nacos-logback.xml nacos.nacos

Test scenarios

The following test scenarios are service discovery interface:

  • Verify Nacos service discovery that the ability to register instance
  • Verify Nacos service discovery that the ability to query instance
  • Verify Nacos service discovery that the ability to delete instance

Test data

1. register instance

Nacos service discovery registry instance the performance of the interface, call the HTTP interface test. The measured 3 nodes cluster performance under different pressure:

machine*concurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
1*10080301849651793.4154.630.81200.86
3*5052932181922612574.815.80.453499.59
4*506097268368701300018.540.463038.48
4*1007772629271691325735.650.483231.2

2. query instance

Nacos service discovery query instance of the performance of the interface, call the HTTP interface test. The measured 3 nodes cluster performance under different pressure:

machine*concurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
1*10080301849653092.1630.860.81509.4
3*5052932181922612574.815.80.453499.59
4*506097268368701560316.410.423042.17
4*1007772629271691360434.190.433434.1

3. delete instance

Nacos service discovery delete instance is given to the performance of the interface, call the HTTP interface test. The measured 3 nodes cluster performance under different pressure:

machine*concurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
1*10080301849651118.9514.080.7597.43
3*5052932181922614508.5311.230.43274.49
4*5060972683687015476.9316.020.383106.23
4*10077726292716911940.940.330.4251052.46

Test results

Nacos service discovery performance test is aimed at a key function, through the pressure test was carried out on the 3 nodes cluster, can see the interface performance load and capacity.

  1. Service for up to 60w pressure measuring capacity, instance registered number up to 110w, cluster running steadily, the desired;(note: due to the registered instance using the HTTP interface, did not report to the heart of the TPS is included, if you want to support millions of instances of heartbeat report, need expansion and cluster level, and tuning tomcat and kernel parameters)
  2. Register the TPS/query instance above 13000, interface to achieve expected;

The tests only temporary instance/query/cancellation of registration, no persistent instance (subsequent);

This test provides you as reference, if there are any deficiency or deviation, please correct me! If you have any other requirements on the performance, can you give us the issue.