Govern Service - 0.8.2 发布 - 基于 Redis 的服务治理平台

栏目: 软件资讯 · 发布时间: 4年前

内容简介:基于 Redis 的服务治理平台(服务注册/发现 & 配置中心) Govern Service 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署...

基于 Redis 的服务治理平台(服务注册/发现 & 配置中心)

Govern Service 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。 借助于 Redis 的高性能, * Govern Service* 提供了超高TPS&QPS。Govern Service 结合本地进程缓存策略 + Redis PubSub,实现实时进程缓存刷新,兼具无与伦比的QPS性能、进程缓存与 Redis 的实时一致性。

更新内容(0.8.2)

1. 添加 NamespaceService 支持,用于管理命名空间

2. 使用 Redis 用户空间通知(user space)替换 键空间通知(key space),移除 Redis notify-keyspace-events 配置要求依赖

3. 优化 Redis lua 脚本,提升性能

4. 优化 本地缓存同步策略(细粒度更新同步),提升本地缓存与分布式缓存同步性能。

安装

Gradle

    val governVersion = "0.8.2";
    implementation("me.ahoo.govern:spring-cloud-starter-config:${governVersion}")
    implementation("me.ahoo.govern:spring-cloud-starter-discovery:${governVersion}")

Maven

<?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.8.2</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>

bootstrap.yml (Spring-Cloud-Config)

spring:
  application:
    name: govern-rest-api
  cloud:
    govern:
      namespace: dev
      config:
        config-id: ${spring.application.name}.yml
      redis:
        mode: standalone
        url: redis://localhost:6379

REST-API Server (Optional)

bin/rest-api

http://localhost:8080/swagger-ui/index.html#/

Namespace

Govern Service - 0.8.2 发布 - 基于 Redis 的服务治理平台

  • /v1/namespaces
    • GET
  • /v1/namespaces/{namespace}
    • PUT
    • GET
  • /v1/namespaces/current
    • GET
  • /v1/namespaces/current/{namespace}
    • PUT

Config

Govern Service - 0.8.2 发布 - 基于 Redis 的服务治理平台

  • /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

Govern Service - 0.8.2 发布 - 基于 Redis 的服务治理平台

  • /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

JMH 基准测试

  • The development notebook : MacBook Pro (M1)
  • All benchmark tests are carried out on the development notebook.
  • Deploying Redis with docker on the development notebook.
gradle jmh

ConfigService

# JMH version: 1.28
# 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       555275866.836          ops/s
RedisConfigServiceBenchmark.getConfig             thrpt           57397.188          ops/s
RedisConfigServiceBenchmark.setConfig             thrpt           56882.673          ops/s

ServiceDiscovery

# 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/work/ahoo-git/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        567329996.255          ops/s
ConsistencyRedisServiceDiscoveryBenchmark.getServices   thrpt       1929377291.635          ops/s
RedisServiceDiscoveryBenchmark.getInstances             thrpt            43760.035          ops/s
RedisServiceDiscoveryBenchmark.getServices              thrpt            60953.971          ops/s
RedisServiceRegistryBenchmark.deregister                thrpt            63133.011          ops/s
RedisServiceRegistryBenchmark.register                  thrpt            53957.797          ops/s
RedisServiceRegistryBenchmark.renew                     thrpt            67116.116          ops/s

TODO

  1. Dashboard
  2. Grayscale Publishing

以上所述就是小编给大家介绍的《Govern Service - 0.8.2 发布 - 基于 Redis 的服务治理平台》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

A Guide to Monte Carlo Simulations in Statistical Physics

A Guide to Monte Carlo Simulations in Statistical Physics

Landau, David P./ Binder, Kurt / Cambridge Univ Pr / 2005-9 / 786.00元

This new and updated edition deals with all aspects of Monte Carlo simulation of complex physical systems encountered in condensed-matter physics, statistical mechanics, and related fields. After brie......一起来看看 《A Guide to Monte Carlo Simulations in Statistical Physics》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具