Govern Service 基于 Redis 的服务治理平台(服务注册/发现 & 配置中心)
Govern Service 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。
借助于 Redis 的高性能, Govern Service 提供了超高TPS&QPS (10W+/s JMH 基准测试)。Govern Service 结合本地进程缓存策略 + Redis PubSub,实现实时进程缓存刷新,兼具无与伦比的QPS性能、进程缓存与 Redis 的实时一致性。
安装
Gradle
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}")
Maven
<?
bootstrap.yml (Spring-Cloud-Config)
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
REST-API Server (Optional
)
安装 REST-API Server
方式一:下载可执行文件
下载 rest-api-server
解压 rest-api-0.9.13.tar
cd rest-api-0.9.13# 工作目录: rest-api-0.9.13bin/rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
方式二:Docker run
docker pull ahoowang/govern-service:0.9.13docker 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-armv7docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.13-armv7
Dashboard
命名空间管理
配置管理
服务管理
REST-API
Namespace
- /v1/namespaces
- GET
- /v1/namespaces/{namespace}
- PUT
- GET
- /v1/namespaces/current
- GET
- /v1/namespaces/current/{namespace}
- PUT
Config
- /v1/namespaces/{namespace}/configs
- GET
- /v1/namespaces/{namespace}/configs/{configId}
- GET
- PUT
- DELETE
- /v1/namespaces/{namespace}/configs/{configId}/versions
- GET
- /v1/namespaces/{namespace}/configs/{configId}/versions/{version}
- GET
- /v1/namespaces/{namespace}/configs/{configId}/to/{targetVersion}
- PUT
Service
- /v1/namespaces/{namespace}/services/
- GET
- /v1/namespaces/{namespace}/services/{serviceId}/instances
- GET
- PUT
- /v1/namespaces/{namespace}/services/{serviceId}/instances/{instanceId}
- DELETE
- /v1/namespaces/{namespace}/services/{serviceId}/instances/{instanceId}/metadata
- PUT
- /v1/namespaces/{namespace}/services/{serviceId}/lb
- GET
JMH-Benchmark
- 基准测试运行环境:笔记本开发机 ( MacBook Pro (M1) )
- 所有基准测试都在开发笔记本上执行。
- Redis 部署环境也在该笔记本开发机上。
ConfigService
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/timeBenchmark Mode Cnt Score Error UnitsConsistencyRedisConfigServiceBenchmark.getConfig thrpt 265321650.148 ops/sRedisConfigServiceBenchmark.getConfig thrpt 106991.476 ops/sRedisConfigServiceBenchmark.setConfig thrpt 103659.132 ops/s
ServiceDiscovery
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/timeBenchmark Mode Cnt Score Error UnitsConsistencyRedisServiceDiscoveryBenchmark.getInstances thrpt 76894658.867 ops/sConsistencyRedisServiceDiscoveryBenchmark.getServices thrpt 466036317.472 ops/sRedisServiceDiscoveryBenchmark.getInstances thrpt 107778.244 ops/sRedisServiceDiscoveryBenchmark.getServices thrpt 106920.412 ops/sRedisServiceRegistryBenchmark.deregister thrpt 114094.513 ops/sRedisServiceRegistryBenchmark.register thrpt 109085.694 ops/sRedisServiceRegistryBenchmark.renew thrpt 127003.104 ops/s
原文转载:http://www.shaoqun.com/a/747779.html
indiegogo:https://www.ikjzd.com/w/265
bestbuy:https://www.ikjzd.com/w/394
GovernService基于Redis的服务治理平台(服务注册/发现&配置中心)GovernService是一个轻量级、低成本的服务注册、服务发现、配置服务SDK,通过使用现有基础设施中的Redis(相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。借助于Redis的高性能,GovernService提供了超高TPS&QPS(10W+/sJMH基准测试)。Gove
auction:https://www.ikjzd.com/w/2311
isbn:https://www.ikjzd.com/w/174
indiegogo:https://www.ikjzd.com/w/265
回家撞见未婚夫和我闺蜜同缸而浴:http://www.30bags.com/m/a/252569.html
父皇皇兄们一起插公主璃儿 公主在洞穴和父皇皇兄做 从小吃父皇的玉液:http://www.30bags.com/a/249681.html
亚马逊运营QA集锦(1104-1113):https://www.ikjzd.com/home/128372
No comments:
Post a Comment