All Projects → Ahoo-Wang → CoSky

Ahoo-Wang / CoSky

Licence: Apache-2.0 license
High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service | 高性能、低成本微服务治理平台

Programming Languages

java
68154 projects - #9 most used programming language
typescript
32286 projects
HTML
75241 projects
kotlin
9241 projects
lua
6591 projects
SCSS
7915 projects

Projects that are alternatives of or similar to CoSky

Nacos
an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
Stars: ✭ 20,691 (+36200%)
Mutual labels:  dns, service-discovery, spring-cloud, configuration-management, nacos
Spring Cloud Alibaba
Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
Stars: ✭ 20,934 (+36626.32%)
Mutual labels:  service-discovery, spring-cloud, cloud-native, service-registry, nacos
Spring Cloud Zookeeper
Spring Cloud Zookeeper
Stars: ✭ 481 (+743.86%)
Mutual labels:  service-discovery, spring-cloud, configuration, cloud-native
Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (+1133.33%)
Mutual labels:  service-discovery, spring-cloud, configuration, cloud-native
Lamp Cloud
lamp-cloud 基于Jdk11 + SpringCloud + SpringBoot的微服务快速开发平台,其中的可配置的SaaS功能尤其闪耀, 具备RBAC功能、网关统一鉴权、Xss防跨站攻击、自动代码生成、多种存储系统、分布式事务、分布式定时任务等多个模块,支持多业务系统并行开发, 支持多服务并行开发,可以作为后端服务的开发脚手架。代码简洁,注释齐全,架构清晰,非常适合学习和企业作为基础框架使用。
Stars: ✭ 4,125 (+7136.84%)
Mutual labels:  spring-cloud, eureka, nacos
Cloud-Native-App-Spring-Boot
A Cloud Native App with Spring Coud Security with KeyCloak Auth Server, API Gateway Server, Naming Server, Config Server and Distributed Tracing and ELK Stack hosted in K8s
Stars: ✭ 19 (-66.67%)
Mutual labels:  spring-cloud, cloud-native, spring-cloud-config
Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+11898.25%)
Mutual labels:  spring-cloud, eureka, nacos
course-spring-microservices
Code examples built for the purpose of video course: Microservices With Spring Boot And Spring Cloud
Stars: ✭ 74 (+29.82%)
Mutual labels:  spring-cloud, spring-cloud-config, eureka
Spring Cloud Cli
Spring Cloud CLI features
Stars: ✭ 139 (+143.86%)
Mutual labels:  spring-cloud, cloud-native, eureka
Microservices Recipes A Free Gitbook
“If you are working in an organization that places lots of restrictions on how developers can do their work, then microservices may not be for you.” ― Sam Newman
Stars: ✭ 393 (+589.47%)
Mutual labels:  service-discovery, spring-cloud, cloud-native
Steeltoe
Steeltoe .NET Core Components: CircuitBreaker, Configuration, Connectors, Discovery, Logging, Management, and Security
Stars: ✭ 612 (+973.68%)
Mutual labels:  service-discovery, configuration, cloud-native
taotao-cloud-project
微服务开发脚手架,包括大数据模块、微服务模块、前端模块。基于Spring Cloud Alibaba的微服务架构。提供技术框架的基础能力的封装,减少开发工作,只关注业务,包含了工作以来的工作总结和技术沉淀
Stars: ✭ 76 (+33.33%)
Mutual labels:  spring-cloud, eureka, nacos
Sample Spring Microservices New
Demo for Spring Boot 2 and Spring Cloud microservices with distributed configuration (Spring Cloud Config), service discovery (Eureka), API gateway (Spring Cloud Gateway, Zuul), Swagger2 API documentation, logs correlation using Spring Cloud Sleuth and many more
Stars: ✭ 559 (+880.7%)
Mutual labels:  service-discovery, spring-cloud, eureka
Spring Cloud Cloudfoundry
Integration between Cloudfoundry and the Spring Cloud APIs
Stars: ✭ 83 (+45.61%)
Mutual labels:  service-discovery, spring-cloud, cloud-native
Eureka Consul Adapter
This project contains a Spring Boot Starter that registers HTTP endpoints on a Spring Cloud Eureka server to support Prometheus's service discovery mechanism for Consul (<consul_sd_config>)
Stars: ✭ 93 (+63.16%)
Mutual labels:  service-discovery, spring-cloud, eureka
js-sdk
JavaScript frontend SDK for ConfigCat. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Stars: ✭ 21 (-63.16%)
Mutual labels:  configuration, configuration-management
tictactoe-microservices-example
An example of Spring Cloud Microservices application based on books (see Links section)
Stars: ✭ 23 (-59.65%)
Mutual labels:  spring-cloud, eureka
php-nacos
阿里巴巴nacos配置中心-PHP客户端
Stars: ✭ 167 (+192.98%)
Mutual labels:  configuration-management, nacos
apollo.net
Apollo配置中心.Net客户端
Stars: ✭ 449 (+687.72%)
Mutual labels:  configuration, configuration-management
superconfig
Access environment variables. Also includes presence validation, type coercion and default values.
Stars: ✭ 33 (-42.11%)
Mutual labels:  configuration, configuration-management

CoSky High-performance, low-cost microservice governance platform (Service Discovery and Configuration Service)

License GitHub release Maven Central Codacy Badge codecov Integration Test Status

中文文档

CoSky is a lightweight, low-cost service registration, service discovery, and configuration service SDK. By using Redis in the existing infrastructure (I believe you have already deployed Redis), it doesn’t need to bring extra to the operation and maintenance deployment. Cost and burden. With the high performance of Redis, CoSky provides ultra-high TPS&QPS (100,000+/s JMH Benchmark). CoSky combines the process cache strategy + Redis PubSub to achieve real-time process cache refresh, with unparalleled QPS performance (70,000,000+/s JMH Benchmark) and real-time consistency between process cache and Redis.

Service Discovery

CoSky-Discovery

Configuration

CoSky-Configuration

Examples

Service Consumer --RPC--> Service Provider Examples

Installation

Gradle

Kotlin DSL

    val coskyVersion = "lastVersion";
    implementation("me.ahoo.cosky:spring-cloud-starter-cosky-config:${coskyVersion}")
    implementation("me.ahoo.cosky:spring-cloud-starter-cosky-discovery:${coskyVersion}")
    implementation("org.springframework.cloud:spring-cloud-starter-loadbalancer:3.0.3")

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)

spring:
  application:
    name: ${service.name:cosky-rest-api}
  redis:
    url: redis://localhost:6379
  cloud:
    cosky:
      namespace: ${cosky.namespace:cosky-{system}}
      config:
        config-id: ${spring.application.name}.yaml
    service-registry:
      auto-registration:
        enabled: ${cosky.auto-registry:true}
logging:
  file:
    name: logs/${spring.application.name}.log

REST-API Server (Optional)

Installation REST-API Server

Option 1:Download the executable file

Download cosky-rest-api-server

tar cosky-rest-api-lastVersion.tar

cd cosky-rest-api-lastVersion
# Working directory: cosky-rest-api-lastVersion
bin/cosky-rest-api --server.port=8080 --spring.redis.uri=redis://localhost:6379

Option 2:Run On Docker

docker pull ahoowang/cosky-rest-api:lastVersion
docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e SPRING_REDIS_URL=redis://redis:6379  ahoowang/cosky-rest-api:lastVersion

Option 3:Run On Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: cosky-rest-api
  labels:
    app: cosky-rest-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cosky-rest-api
  template:
    metadata:
      labels:
        app: cosky-rest-api
    spec:
      containers:
        - env:
            - name: SPRING_REDIS_URL
              value: redis://redis-uri:6379
          image: ahoowang/cosky-rest-api:lastVersion
          name: cosky-rest-api
          ports:
            - containerPort: 8080
              protocol: TCP
          resources:
            limits:
              cpu: "1"
              memory: 1280Mi
            requests:
              cpu: 250m
              memory: 1024Mi
          volumeMounts:
            - mountPath: /etc/localtime
              name: volume-localtime
      volumes:
        - hostPath:
            path: /etc/localtime
            type: ""
          name: volume-localtime

---
apiVersion: v1
kind: Service
metadata:
  name: cosky-rest-api
  labels:
    app: cosky-rest-api
spec:
  selector:
    app: cosky-rest-api
  ports:
    - name: rest
      port: 80
      protocol: TCP
      targetPort: 8080

Dashboard

http://localhost:8080/dashboard

CoSky-Dashboard

Service dependent topology

CoSky-Dashboard-topology

Role-based access control(RBAC)

  • cosky: Reserved username, super user, with the highest authority. When the application is launched for the first time, the super user (cosky) password will be initialized and printed on the console. Don't worry if you forget your password, you can configure enforce-init-super-user: true, CoSky will help you reinitialize the password and print it on the console.
---------------- ****** CoSky -  init super user:[cosky] password:[6TrmOux4Oj] ****** ----------------
  • admin: Reserved roles, super administrator roles, have all permissions, a user can be bound to multiple roles, and a role can be bound to multiple resource operation permissions.
  • Permission control granularity is namespace, read and write operations

Role Permissions

CoSky-Dashboard-role

Add Role

CoSky-Dashboard-role-add

User Management

CoSky-Dashboard-user

Add User

CoSky-Dashboard-user-add

Audit Log

CoSky-Dashboard-audit-log

Namespace

CoSky-Dashboard-namespace

Config

CoSky-Dashboard-config

Edit configuration

CoSky-Dashboard-config-edit

Rollback configuration

CoSky-Dashboard-config-rollback

Import configuration from Nacos

CoSky-Dashboard-config-import

Service

CoSky-Dashboard-service

Edit Service Instance

CoSky-Dashboard-service-edit

REST-API

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

Namespace

rest-api-namespace

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

Config

rest-api-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

rest-api-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

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

ConfigService

gradle cosky-config:jmh
# or
java -jar cosky-config/build/libs/cosky-config-lastVersion-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1
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

gradle cosky-discovery:jmh
# or
java -jar cosky-discovery/build/libs/cosky-discovery-lastVersion-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1
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 (Real-time synchronization of service instance change status)

CoSky-Mirror is like a mirror placed between Nacos and CoSky to build a unified service discovery platform.

CoSky-Mirror

CoSky-Mirror-Unified

Comparison with others

CoSky Eureka Consul CoreDNS Zookeeper Nacos Apollo
CAP CP+AP AP CP CP CP CP+AP CP+AP
Health Check Client Beat Client Beat TCP/HTTP/gRPC/Cmd Keep Alive Keep Alive TCP/HTTP/Client Beat Client Beat
Load Balancing Strategy Weight/Selector Ribbon Fabio RoundRobin RoundRobin Weight/metadata/RoundRobin RoundRobin
Avalanche Protection N Y N N N Y N
Auto Logoff Instance Support Support Not Support Not Support Support Support Support
Access Protocol HTTP/Redis HTTP HTTP/DNS DNS TCP HTTP/DNS HTTP
Listening Support Support Support Support Not Support Support Support Support
Multi-data Center Support Support Support Not Support Not Support Support Support
Cross Registry Synchronization Support Not Support Support Not Support Not Support Support Not Support
SpringCloud Integration Support Support Support Not Support Not Support Support Support
Dubbo Integration Support Not Support Not Support Not Support Support Support Support
K8S Integration Support Not Support Support Support Not Support Support Not Support
Persistence Redis MySql MySql
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].