简介
CoSky 高性能、低成本微服务治理平台(服务注册/发现 & 配置中心)
English Document
服务注册与发现
配置中心
Examples
安装
Gradle
Kotlin DSL
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>
<cosky.version>lastVersion</cosky.version>
</properties>
<dependencies>
<dependency>
<groupId>me.ahoo.cosky</groupId>
<artifactId>spring-cloud-starter-cosky-config</artifactId>
<version>${cosky.version}</version>
</dependency>
<dependency>
<groupId>me.ahoo.cosky</groupId>
<artifactId>spring-cloud-starter-cosky-discovery</artifactId>
<version>${cosky.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
<version>3.0.3</version>
</dependency>
</dependencies>
</project>
bootstrap.yaml (Spring-Cloud-Config)
REST-API Server (Optional
)
安装 REST-API Server
方式一:下载可执行文件
下载 cosky-server
解压 cosky-lastVersion.tar
方式二:在 Docker 中运行
方式三:在 Kubernetes 中运行
Dashboard
http://localhost:8080/dashboard
服务依赖拓扑
基于角色的访问控制(RBAC)
enforce-init-super-user: true
,CoSky 会帮助你重新初始化密码并打印在控制台。---------------- ****** CoSky - init super user:[cosky] password:[6TrmOux4Oj] ****** ----------------
角色权限
添加角色
用户管理
添加用户
审计日志
命名空间管理
配置管理
编辑配置
回滚配置
从 Nacos 导入配置
服务管理
编辑服务实例信息
JMH-Benchmark
ConfigService
Benchmark Mode Cnt Score Error Units
ConsistencyRedisConfigServiceBenchmark.getConfig thrpt 256733987.827 ops/s
RedisConfigServiceBenchmark.getConfig thrpt 241787.679 ops/s
RedisConfigServiceBenchmark.setConfig thrpt 140461.112 ops/s
ServiceDiscovery
Benchmark Mode Cnt Score Error Units
ConsistencyRedisServiceDiscoveryBenchmark.getInstances thrpt 76621729.048 ops/s
ConsistencyRedisServiceDiscoveryBenchmark.getServices thrpt 455760632.346 ops/s
RedisServiceDiscoveryBenchmark.getInstances thrpt 226909.985 ops/s
RedisServiceDiscoveryBenchmark.getServices thrpt 304979.150 ops/s
RedisServiceRegistryBenchmark.deregister thrpt 255305.648 ops/s
RedisServiceRegistryBenchmark.register thrpt 110664.160 ops/s
RedisServiceRegistryBenchmark.renew thrpt 210960.325 ops/s
CoSky-Mirror (实时同步服务实例变更状态)
CoSky-Mirror 就像一个镜子放在 Nacos、CoSky 中间,构建一个统一的服务发现平台。
其他同类产品对比
CoSky | Eureka | Consul | CoreDNS | Zookeeper | Nacos | Apollo | |
---|---|---|---|---|---|---|---|
CAP | CP+AP | AP | CP | CP | CP | CP+AP | CP+AP |
健康检查 | Client Beat | Client Beat | TCP/HTTP/gRPC/Cmd | Keep Alive | Keep Alive | TCP/HTTP/Client Beat | Client Beat |
负载均衡策略 | 权重/RoundRobin | Ribbon | Fabio | RoundRobin | RoundRobin | 权重/metadata/Selector | RoundRobin |
雪崩保护 | 无 | 有 | 无 | 无 | 无 | 有 | 无 |
自动注销 实例 | 支持 | 支持 | 不支持 | 不支持 | 支持 | 支持 | 支持 |
访问协议 | HTTP/Redis | HTTP | HTTP/DNS | DNS | TCP | HTTP/DNS | HTTP |
监听支持 | 支持 | 支持 | 支持 | 不支持 | 支持 | 支持 | 支持 |
多数据中心 | 支持 | 支持 | 支持 | 不支持 | 不支持 | 支持 | 支持 |
跨注册中心同步 | 支持 | 不支持 | 支持 | 不支持 | 不支持 | 支持 | 不支持 |
SpringCloud集成 | 支持 | 支持 | 支持 | 不支持 | 不支持 | 支持 | 支持 |
Dubbo集成 | 支持 | 不支持 | 不支持 | 不支持 | 支持 | 支持 | 支持 |
K8S集成 | 支持 | 不支持 | 支持 | 支持 | 不支持 | 支持 | 不支持 |
持久化 | Redis | MySql | MySql |
修改于 2023-11-14 03:43:07