最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Govern Service 基于 Redis 的服務(wù)治理平臺安裝過程詳解

 更新時間:2021年05月17日 08:47:16   作者:阿虎  
Govern Service 是一個輕量級、低成本的服務(wù)注冊、服務(wù)發(fā)現(xiàn)、 配置服務(wù) SDK,通過使用現(xiàn)有基礎(chǔ)設(shè)施中的 Redis 不用給運維部署帶來額外的成本與負(fù)擔(dān),接下來通過本文給大家分享Govern Service 基于 Redis 的服務(wù)治理平臺的相關(guān)知識,感興趣的朋友一起看看吧

Govern Service 基于 Redis 的服務(wù)治理平臺(服務(wù)注冊/發(fā)現(xiàn) & 配置中心)

Govern Service 是一個輕量級、低成本的服務(wù)注冊、服務(wù)發(fā)現(xiàn)、 配置服務(wù) SDK,通過使用現(xiàn)有基礎(chǔ)設(shè)施中的 Redis (相信你已經(jīng)部署了Redis),不用給運維部署帶來額外的成本與負(fù)擔(dān)。
借助于 Redis 的高性能, Govern Service 提供了超高TPS&QPS (10W+/s JMH 基準(zhǔn)測試)。Govern Service 結(jié)合本地進程緩存策略 + Redis PubSub,實現(xiàn)實時進程緩存刷新,兼具無與倫比的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

<?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>

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

方式一:下載可執(zhí)行文件

下載 rest-api-server

解壓 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 run

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

http://localhost:8080/dashboard

Dashboard

命名空間管理

配置管理

服務(wù)管理

REST-API

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

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

  • 基準(zhǔn)測試運行環(huán)境:筆記本開發(fā)機 ( MacBook Pro (M1) )
  • 所有基準(zhǔn)測試都在開發(fā)筆記本上執(zhí)行。
  • Redis 部署環(huán)境也在該筆記本開發(fā)機上。

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

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

作者:Ahoo Wang (阿虎)

Github: https://github.com/Ahoo-Wang/

SmartSql(高性能、高生產(chǎn)力,超輕量級的ORM!): https://github.com/dotnetcore/SmartSql

SmartCode(不只是代碼生成器!): https://github.com/dotnetcore/SmartCode

Govern Service 基于 Redis 的服務(wù)治理平臺(服務(wù)注冊/發(fā)現(xiàn) & 配置中心): https://github.com/Ahoo-Wang/govern-service

Govern EventBus 歷經(jīng)多年生產(chǎn)環(huán)境驗證的事件驅(qū)動架構(gòu)框架: https://github.com/Ahoo-Wang/govern-eventbus

以上就是Govern Service 基于 Redis 的服務(wù)治理平臺的詳細內(nèi)容,更多關(guān)于Redis 服務(wù)治理的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • redis過期回調(diào)功能實現(xiàn)示例

    redis過期回調(diào)功能實現(xiàn)示例

    Redis提供了一種過期回調(diào)的機制,可以在某個鍵過期時觸發(fā)一個回調(diào)函數(shù),本文就來介紹一下redis過期回調(diào)功能實現(xiàn)示例,感興趣的可以了解一下
    2023-09-09
  • Redis使用bloom-filter過濾器實現(xiàn)推薦去重

    Redis使用bloom-filter過濾器實現(xiàn)推薦去重

    這篇文章主要介紹了Redis使用bloom-filter過濾器實現(xiàn)推薦去重,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2020-11-11
  • redis3.2配置文件redis.conf詳細說明

    redis3.2配置文件redis.conf詳細說明

    redis3.2配置詳解,Redis啟動的時候,可以指定配置文件,詳細說明請看本文說明
    2018-03-03
  • redis中如何做到內(nèi)存優(yōu)化

    redis中如何做到內(nèi)存優(yōu)化

    為了提高數(shù)據(jù)處理效率和降低存儲成本,優(yōu)化數(shù)據(jù)結(jié)構(gòu)和采用高效的存儲策略至關(guān)重要,使用最小存儲形式、整數(shù)編碼、Redis的HyperLogLog等方法可以有效減少內(nèi)存占用,Redis6引入的對象壓縮、設(shè)置合理的過期時間、數(shù)據(jù)分片
    2024-09-09
  • Redis分布式鎖詳細介紹

    Redis分布式鎖詳細介紹

    大家好,本篇文章主要講的是Redis分布式鎖詳細介紹,感興趣的同學(xué)趕快來看一看吧,對你有幫助的話記得收藏一下,方便下次瀏覽
    2021-12-12
  • Redis高效查詢大數(shù)據(jù)的實踐與優(yōu)化詳細指南

    Redis高效查詢大數(shù)據(jù)的實踐與優(yōu)化詳細指南

    Redis 是一種高性能的鍵值存儲數(shù)據(jù)庫,廣泛應(yīng)用于緩存,排行榜,計數(shù)器等場景,本文將圍繞如何高效查詢Redis中滿足條件的數(shù)據(jù)展開討論,感興趣的小伙伴可以了解下
    2025-04-04
  • 一文弄懂Redis 線程模型

    一文弄懂Redis 線程模型

    使用Redis 時,幾乎不存在 CPU 成為瓶頸的情況, Redis 主要受限于內(nèi)存和網(wǎng)絡(luò) 使用了單線程后,可維護性高,感興趣的可以了解一下
    2024-02-02
  • k8s部署redis遠程連接的項目實踐

    k8s部署redis遠程連接的項目實踐

    本文主要介紹了k8s部署redis遠程連接的項目實踐,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2024-10-10
  • 分布式鎖三種實現(xiàn)方式及對比

    分布式鎖三種實現(xiàn)方式及對比

    這篇文章主要介紹了分布式鎖三種實現(xiàn)方式及對比,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2020-04-04
  • redis中的bitmap你了解嗎

    redis中的bitmap你了解嗎

    這篇文章主要為大家詳細介紹了redis中的bitmap,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助
    2022-03-03

最新評論

洛阳市| 广饶县| 宜黄县| 综艺| 札达县| 云南省| 佛教| 嘉定区| 中西区| 宜黄县| 上犹县| 莆田市| 滦平县| 利津县| 阿尔山市| 湘潭县| 彭山县| 绵竹市| 周至县| 凌海市| 舞钢市| 静乐县| 二手房| 隆子县| 明水县| 什邡市| 永和县| 通许县| 库车县| 兖州市| 温宿县| 抚顺市| 大竹县| 额济纳旗| 普安县| 阳原县| 宁南县| 万全县| 马关县| 迭部县| 体育|