标签:基准测试 virtual wan model 工作 shel Delve over alt
Govern Service 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。
借助于 Redis 的高性能, Govern Service 提供了超高TPS&QPS (10W+/s JMH 基准测试)。Govern Service 结合本地进程缓存策略 + Redis PubSub,实现实时进程缓存刷新,兼具无与伦比的QPS性能、进程缓存与 Redis 的实时一致性。
Kotlin DSL
val governVersion = "0.9.13";
implementation("me.ahoo.govern:spring-cloud-starter-config:${governVersion}")
implementation("me.ahoo.govern:spring-cloud-starter-discovery:${governVersion}")
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>demo</artifactId>
<properties>
<govern.version>0.9.13</govern.version>
</properties>
<dependencies>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
<version>${govern.version}</version>
</dependency>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-discovery</artifactId>
<version>${govern.version}</version>
</dependency>
</dependencies>
</project>
spring:
application:
name: ${service.name:govern-rest-api}
cloud:
govern:
namespace: ${govern.namespace:govern-{system}}
config:
config-id: ${spring.application.name}.yml
redis:
mode: ${govern.mode:standalone}
url: ${govern.redis.uri:redis://localhost:6379}
logging:
file:
name: logs/${spring.application.name}.log
Optional
)解压 rest-api-0.9.13.tar
cd rest-api-0.9.13
# 工作目录: rest-api-0.9.13
bin/rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
docker pull ahoowang/govern-service:0.9.13
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.13
MacBook Pro (M1)
请使用 ahoowang/govern-service:0.9.13-armv7
docker pull ahoowang/govern-service:0.9.13-armv7
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.13-armv7
gradle config:jmh
# JMH version: 1.29
# VM version: JDK 11.0.11, OpenJDK 64-Bit Server VM, 11.0.11+9-LTS
# VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/config/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# Blackhole mode: full + dont-inline hint
# Warmup: 1 iterations, 10 s each
# Measurement: 1 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 50 threads, will synchronize iterations
# Benchmark mode: Throughput, ops/time
Benchmark Mode Cnt Score Error Units
ConsistencyRedisConfigServiceBenchmark.getConfig thrpt 265321650.148 ops/s
RedisConfigServiceBenchmark.getConfig thrpt 106991.476 ops/s
RedisConfigServiceBenchmark.setConfig thrpt 103659.132 ops/s
gradle discovery:jmh
# JMH version: 1.29
# VM version: JDK 11.0.11, OpenJDK 64-Bit Server VM, 11.0.11+9-LTS
# VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/discovery/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# Blackhole mode: full + dont-inline hint
# Warmup: 1 iterations, 10 s each
# Measurement: 1 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 50 threads, will synchronize iterations
# Benchmark mode: Throughput, ops/time
Benchmark Mode Cnt Score Error Units
ConsistencyRedisServiceDiscoveryBenchmark.getInstances thrpt 76894658.867 ops/s
ConsistencyRedisServiceDiscoveryBenchmark.getServices thrpt 466036317.472 ops/s
RedisServiceDiscoveryBenchmark.getInstances thrpt 107778.244 ops/s
RedisServiceDiscoveryBenchmark.getServices thrpt 106920.412 ops/s
RedisServiceRegistryBenchmark.deregister thrpt 114094.513 ops/s
RedisServiceRegistryBenchmark.register thrpt 109085.694 ops/s
RedisServiceRegistryBenchmark.renew thrpt 127003.104 ops/s
Govern Service 基于 Redis 的服务治理平台
标签:基准测试 virtual wan model 工作 shel Delve over alt
原文地址:https://www.cnblogs.com/Ahoo-Wang/p/govern-service.html