Govern Service - 0.8.2 发布 - 基于 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
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
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
- Dashboard
- Grayscale Publishing

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
-
上一篇
MySQL性能优化(一):MySQL架构与核心问题
一、前言 作为程序员的你,数据库作为一门必修课,而MySQL数据库毫无疑问已经是最常用的数据库了。系统的稳定、高效、高并发等指标,很大程度上取决于数据库性能是否够优,可见性能优化的重要性,这也就不难理解各位在任何一场面试中都会被问及到数据库调优相关的问题。 因此,这就是我为何考虑写该系列文章的主要原因,希望该系列文章(MySQL性能优化)能够给你带来收获,让你更系统、更全面的掌握MySQL性能优化的技能、技巧。该系列文章将会持续分享、更新,如果觉得现在或者将来可能对你有用,不妨持续关注、收藏。 在MySQL性能优化之前,你有必要重新再认识下MySQL,便于后续更容易理解MySQL性能优化中涉及到的知识点。本文将从MySQL架构、核心问题来针对性展开讨论,这也将是MySQL性能优化系列文章的开篇之作。 二、MySQL逻辑架构 想深入探究MySQL之前,有必要了解一下MySQL的逻辑架构,逻辑架构图如下: MySQL的逻辑架构中,分为三层,如上图红色虚线框的三部分。 最上层架构并不是MySQL所独有的,大多数基于客户端/服务器形态的系统或者服务,都有类似的架构,其中包含MySQL的连接处理...
-
下一篇
SpringBlade 3.0.3 发布,新增 kuboard-k8s 一键部署方案
简介: SpringBlade 是由一个商业级项目升级优化而来的 SpringCloud 微服务架构,采用 Java8 API 重构了业务代码,完全遵循阿里巴巴编码规范。采用 Spring Boot 2.4 、Spring Cloud 2020 、Mybatis 等核心技术,用于快速搭建企业级的 SaaS 微服务系统平台。 SpringBlade 同时提供 SpringBoot 单体架构版本,为中小型项目保驾护航,可与两套分别基于 React 和 Vue 的前端框架无缝对接。 SpringBlade 致力于创造新颖的开发模式,将开发中遇到的痛点、生产中所踩的坑整理归纳,并将解决方案都融合到框架中。 版本更新信息: 新增blade-develop的dockerfile 新增blade-develop推送docker配置 新增saber的dockerfile 新增kuboard k8s部署脚本 新增kuboard k8s部署方案 优化pom配置适配新版部署方案 优化swagger加载逻辑默认开启knife4j K8s部署文档 k8s部署文档请见:点击查看 Kubord简介 Kuboard ...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- CentOS8,CentOS7,CentOS6编译安装Redis5.0.7
- Docker使用Oracle官方镜像安装(12C,18C,19C)
- SpringBoot2全家桶,快速入门学习开发网站教程
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
- SpringBoot2整合Redis,开启缓存,提高访问速度
- MySQL8.0.19开启GTID主从同步CentOS8
- SpringBoot2更换Tomcat为Jetty,小型站点的福音
- CentOS7,8上快速安装Gitea,搭建Git服务器
- Dcoker安装(在线仓库),最新的服务器搭配容器使用