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

  1. /opt/taobao/java/bin/java -server
  2. -Xms20g
  3. -Xmx20g
  4. -Xmn10g -XX:MetaspaceSize=128m
  5. -XX:MaxMetaspaceSize=320m
  6. -XX:-OmitStackTraceInFastThrow
  7. -XX:+HeapDumpOnOutOfMemoryError
  8. -XX:HeapDumpPath=/home/admin/nacos/logs/java_heapdump.hprof
  9. -XX:-UseLargePages
  10. -Djava.ext.dirs=/opt/taobao/java/jre/lib/ext:/opt/taobao/java/lib/ext:/home/admin/nacos/plugi
  11. ns/cmdb:/home/admin/nacos/plugins/mysql -Xloggc:/home/admin/nacos/logs/nacos_gc.log
  12. -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps
  13. -XX:+UseGCLogFileRotation
  14. -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Xdebug
  15. -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
  16. -Dnacos.home=/home/admin/nacos -jar /home/admin/nacos/target/nacos-server.jar
  17. --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/home/admin/naco
  18. 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:

machineconcurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
110080301849651793.4154.630.81200.86
35052932181922612574.815.80.453499.59
4506097268368701300018.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:

machineconcurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
110080301849653092.1630.860.81509.4
35052932181922612574.815.80.453499.59
4506097268368701560316.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:

machineconcurrency numservice numregister instance numTPSRT(ms)MIN RT(ms)MAX RT(ms)
110080301849651118.9514.080.7597.43
35052932181922614508.5311.230.43274.49
45060972683687015476.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.