Service Discovery and Governance Center for Distributed and Microservice Architecture

Overview

Polaris: Service Discovery and Governance

Build Status

English | 简体中文


README:

Visit website to learn more

Introduction

Polaris is a cloud-native service discovery and governance center. It can be used to solve the problem of service connection, fault tolerance, traffic control and secure in distributed and microservice architecture.

Functions:

  • basic: service discover, service register and health check
  • fault tolerance: circuit break and rate limit
  • traffic control: request route and load balance
  • secure: authenticate

Features:

  • It provides SDK for high-performance business scenario and sidecar for non-invasive development mode.
  • It provides multiple clients for different development languages, such as Java, Go, C++ and Nodejs.
  • It can integrate with different service frameworks and gateways, such as Spring Cloud, gRPC and Nginx.
  • It is compatible with Kubernetes and supports automatic injection of K8s service and Polaris sidecar.

Components

server:

client:

ecosystem:

others:

  • website: Source for the polarismesh.cn site
  • samples: Samples for Learning PolarisMesh

Getting started

Preconditions

Prepare database

Please download and install MySQL, version requirement >=5.7, download available here: https://dev.mysql.com/downloads/mysql/5.7.html

Import SQL script

Point Script: ./store/defaultStore/polaris_server.sql, one can import through mysql admin or console.

Prepare golang compile environment

Polaris server end needs golang compile environment, version number needs >=1.12, download available here: https://golang.org/dl/#featured.

Build

chmod +x build.sh
./build.sh

After built, one can see 'polaris-server-release_${version}.tar.gz' package from the list.

Installation

Unzip package

Obtain polaris-server-release_${version}.tar.gz, and unzip.

Change polaris configuration

After unzipped, vi polaris-server.yaml, replace DB configuration's variable to real database information : ##DB_USER## (database username), ##DB_PWD##(database password), ##DB_ADDR##(database address), ##DB_NAME##(database name)

Execute Installation Script

chmod +x ./tool/*.sh
# install
./tool/start.sh
# test whether the process is successful 
./tool/p.sh

After all, run ./p.sh, prompt Polaris Server, proof the installation is successful

Verify installation

curl http://127.0.0.1:8090

Return text is 'Polaris Server', proof features run smoothly

Chat group

Please scan the QR code to join the chat group.

Welcome to scan the QR code to follow our official account, we will share the latest application cases and updates of PolarisMesh.

Contribution

If you have good comments or suggestions, please give us Issues or Pull Requests to contribute to improve the development experience of Polaris Mesh.
see details:CONTRIBUTING.md

Tencent Open Source Incentive Plan encourages developers to participate and contribute. Look forward to your participation.

Comments
  • 北极星内部事件中心机制优化

    北极星内部事件中心机制优化

    What is the feature you want to add?

    1. 一个统一的事件中心
    2. 每种事件有自己单独的publisher,每种事件的产生、发布、消费互不影响
    3. 将原本的服务事件插件与该事件中心组合,建立一个Listener,该Listener的逻辑代替原本discoverevent的逻辑
    4. 后续基于此事件中心,实现配置相关事件的暴露、持久化日志等操作

    Why do you want to add this feature?

    How to implement this feature?

    Additional context Add any other context or screenshots about the feature request here.

    enhancement good advanced issue issue-shoot 
    opened by chuntaojun 18
  • 由于polaris-server.yaml配置不当,引起polaris-server服务启动之后访问不了

    由于polaris-server.yaml配置不当,引起polaris-server服务启动之后访问不了

    在修改 polaris-server.yaml配置文件中,忘记注释掉
    ###单机文件存储插件 #name: boltdbStore 的配置,开启了数据库存储插件的配置: ###存储配置 store: ###数据库存储插件 name: defaultStore option: master: dbType: mysql dbName: polaris_server dbAddr: 数据库地址,格式为ip:port dbUser: 数据库用户名 dbPwd: 数据库密码 导致 polaris-server 启动之后,访问不了,希望这里能对store进行区分配置单机文件存储插件和数据库存储插件的配置,感谢感谢

    need-feedback 
    opened by XW512 14
  • feat: add docker-compose based development environment

    feat: add docker-compose based development environment

    Please provide issue(s) of this PR: Fixes #453

    • docker-compose-based development environment, contains redis-sentinelredis-clustermysqlprometheusgrafanapolaris-console.
    • polaris-server support hot reload when code or config files changed.
    • append golang runtime metrics to metrics exporter for performance analysis etc.

    To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

    • [ ] Configuration
    • [ ] Docs
    • [x] Installation
    • [ ] Performance and Scalability
    • [ ] Naming
    • [ ] HealthCheck
    • [ ] Test and Release

    Please check any characteristics that apply to this pull request.

    • [ ] Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.
    opened by edocevol 13
  • build: use Makefile to build Polaris instead of `build.sh`

    build: use Makefile to build Polaris instead of `build.sh`

    Signed-off-by: mango [email protected]

    Please provide issue(s) of this PR: Fixes #539

    To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

    • [ ] Configuration
    • [x] Docs
    • [x] Installation
    • [ ] Performance and Scalability
    • [ ] Naming
    • [ ] HealthCheck
    • [ ] Test and Release

    Please check any characteristics that apply to this pull request.

    • [ ] Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.
    opened by mangoGoForward 11
  • 修改CHARSET = utf8mb4 COLLATE = utf8mb4_bin;

    修改CHARSET = utf8mb4 COLLATE = utf8mb4_bin;

    Please provide issue(s) of this PR: Fixes #430

    To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

    • [ ] Configuration
    • [ ] Docs
    • [x] Installation
    • [ ] Performance and Scalability
    • [ ] Naming
    • [ ] HealthCheck
    • [ ] Test and Release

    Please check any characteristics that apply to this pull request.

    • [ ] Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.
    issue-shoot 
    opened by HIPIAOYI 10
  • fix:修复db与server时区不一致导致的问题

    fix:修复db与server时区不一致导致的问题

    Please provide issue(s) of this PR: Fixes #345

    To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

    • [X] Configuration
    • [ ] Docs
    • [ ] Installation
    • [ ] Performance and Scalability
    • [X] Naming
    • [ ] HealthCheck
    • [ ] Test and Release

    Please check any characteristics that apply to this pull request.

    • [ ] Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.

    建立mysql的Seesion会话时,可以指定时区,从而使得timestamp转出和转入时以指定时区为准,这里修改配置将Mysql建立会话的时区修改为Local,解决与服务端不一致问题。 go-mysql-driver configure timezone: https://github.com/go-sql-driver/mysql/blob/master/dsn.go#L235 mysql about timestamp https://dev.mysql.com/doc/refman/8.0/en/datetime.html

    bug service need-feedback 
    opened by enjoyliu 10
  • feat: refactor redispool

    feat: refactor redispool

    Please provide issue(s) of this PR: refactor # refactor common/redispool for https://github.com/polarismesh/polaris/issues/404 for https://github.com/polarismesh/polaris/pull/403 for https://github.com/polarismesh/polaris/pull/398

    need discuss 
    opened by daheige 9
  • polaris-server支持redis哨兵模式和集群模式

    polaris-server支持redis哨兵模式和集群模式

    What is the feature you want to add?

    polaris-server支持redis哨兵模式和集群模式

    Why do you want to add this feature?

    现有polaris-server只支持redis的直连模式,这种情况极度依赖 云上的redis产品。 建议polaris-server 支持 哨兵模式和redis 集群模式,支持polaris-server接入独立部署的redis。 哨兵模式 优先级高于 集群模式。 预期版本1.9和2.0。

    How to implement this feature? 参考 github.com/go-redis/redis/v8

    改造思路: 方案一:改写common/redispool/redis_pool.go,支持UniversalClient实现,支持各种高可用模式。需要调整现有配置。 方案二:新增基于哨兵的redis_pool和 基于集群的redis_pool,然后注入到heartbeatredis。无需改动现有配置,新增即可。

    Additional context Add any other context or screenshots about the feature request here.

    enhancement good first issue issue-shoot 
    opened by davionchen 8
  • 部署在kubernetes失败

    部署在kubernetes失败

    根据官方文档,部署在kubernetes时,polaris-server启用失败,错误如下: bootstrap/server.go:477 self register err: self service(polaris.config) in namespace(Polaris) not found [ERROR] register polaris service fail: self service(polaris.config) in namespace(Polaris) not found 版本:v1.11.3

    bug 
    opened by VVFtang 7
  • 支持灰度发布的场景化能力

    支持灰度发布的场景化能力

    What is the feature you want to add?

    Why do you want to add this feature?

    How to implement this feature?

    Additional context Add any other context or screenshots about the feature request here.

    enhancement keystone 
    opened by andrewshan 7
  • 是否需要支持serviceId大小写不敏感或类似eureka的大写模式?

    是否需要支持serviceId大小写不敏感或类似eureka的大写模式?

    What is the feature you want to add? 支持serviceId大小写不敏感模式

    Why do you want to add this feature? spring.application.name即serviceId一般是小写,这是前提。

    考虑历史业务从eureka迁移到polaris的场景,服务注册发现服务端部署polaris替代eureka server之后,存量的eureka client在8761端口注册的serviceId是大写,改造后的polaris discovery在8091端口注册的serviceId是小写,这就导致eureka client找不到polaris discovery注册的服务,polaris discovery找不到eureka client注册的服务,给迁移造成困难。

    enhancement need discuss service good advanced issue issue-shoot 
    opened by MI-cool 7
  • docker-compose build polaris-server image error

    docker-compose build polaris-server image error

    Describe the bug

    According to the steps of polaris/release/standalone/docker-compose/README.md, mysql and redis can be started, but polaris-server can't.

    To Reproduce

    cd polaris/deploy/standalone/docker-compose
    docker-compose up -d polaris-server
    

    Expected behavior

    polaris-server container loads configs from polaris-server.yaml and start up correctly.

    Environment

    • Version: v1.14.0
    • OS: Ubuntu2204

    Additional context

    error information detail:

    2023/01/05 16:16:54 maxprocs: Leaving GOMAXPROCS=6: CPU quota undefined
    2023-01-05T16:16:54.563595Z	error	i18n/translate.go:48	[i18n][MessageFile] load fail	{"error": "open apiserver/httpserver/i18n/zh.toml: no such file or directory"}
    2023-01-05T16:16:54.563648Z	error	i18n/translate.go:48	[i18n][MessageFile] load fail	{"error": "open apiserver/httpserver/i18n/en.toml: no such file or directory"}
    [INFO] load config from polaris-server.yaml
    [ERROR] open polaris-server.yaml: no such file or directory
    [ERROR] load config fail
    
    bug 
    opened by sun2008mt 2
  • 最新版本,配置中心无法动态获取配置

    最新版本,配置中心无法动态获取配置

    Describe the bug 配置中心-无法动态获取配置(修改完配置后,通过上下文读取的配置没有变化)

    To Reproduce image image image image image

    Expected behavior A clear and concise description of what you expected to happen.

    Environment

    • Version: SpringBoot 3.0.1、SpringCloud 2022.0.0、SpringCloudTencent 1.8.2-2022.0.0

    Additional context

    bug 
    opened by KouShenhai 3
  • [WIP]grpc-based plugin

    [WIP]grpc-based plugin

    Please provide issue(s) of this PR: Fixes #

    To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

    • [ ] ApiServer
    • [ ] Auth
    • [ ] Configuration
    • [ ] Naming
    • [ ] HealthCheck
    • [ ] Metrics
    • [ ] Docs
    • [ ] Installation
    • [ ] Performance and Scalability
    • [ ] Test and Release

    Please check any characteristics that apply to this pull request.

    • [ ] Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.
    opened by edocevol 1
  • 缓存的storeTIme更新异常,通过console更新的service数据,无法正确地同步到SDK

    缓存的storeTIme更新异常,通过console更新的service数据,无法正确地同步到SDK

    Describe the bug 通过console修改instances信息

    image

    通过sdk拉取的的instances信息 image

    两者不一致。

    查看polaris-cache.log,有异常信息:

    022-12-20T14:32:36.455434Z error cache cache/store_time.go:47 [Store][Time] watch store time {"error": "Error 1040: Too many connections"} 2022-12-20T14:37:43.447123Z error cache cache/store_time.go:47 [Store][Time] watch store time {"error": "Error 1040: Too many connections"}

    Environment

    • Version: 1.12.1
    bug 
    opened by davionchen 1
  • [TEST] 完善 healthcheck 模块的单元测试以及边界测试

    [TEST] 完善 healthcheck 模块的单元测试以及边界测试

    What is the feature you want to add?

    Why do you want to add this feature?

    How to implement this feature?

    Additional context Add any other context or screenshots about the feature request here.

    test code quality health check github-action 
    opened by chuntaojun 0
Releases(v1.13.6)
Owner
Polarismesh
a service discovery and governance center that supports gRPC, Spring Cloud, Service Mesh, Kubernetes and others
Polarismesh
Hexagonal architecture paradigms, such as dividing adapters into primary (driver) and secondary (driven)Hexagonal architecture paradigms, such as dividing adapters into primary (driver) and secondary (driven)

authorizer Architecture In this project, I tried to apply hexagonal architecture paradigms, such as dividing adapters into primary (driver) and second

Renato Benatti 0 Dec 7, 2021
Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

Open Service Mesh (OSM) Open Service Mesh (OSM) is a lightweight, extensible, Cloud Native service mesh that allows users to uniformly manage, secure,

Open Service Mesh 2.5k Jan 2, 2023
The mec platform for service register/discovery/subscribe and other functions.roject main repo.

EdgeGallery MEP project Introduction Edgegallery MEP is an open source implementation of MEC platform according to ETSI MEC 003 [1] and 011 [2] docume

EdgeGallery 37 Nov 15, 2022
Service registry/discovery implementation in Go.

go-service-registry Availabe endpoints : GET http://localhost:3000/ --> Dashboard GET http://localhost:3000/services/[serviceName] --> Get available

null 1 Feb 11, 2022
Topology-tester - Application to easily test microservice topologies and distributed tracing including K8s and Istio

Topology Tester The Topology Tester app allows you to quickly build a dynamic mi

Bas van Beek 1 Jan 14, 2022
Service-scaling - Microservice scaling with example

Scaling examples This is the repo for my (Hungarian) Twitch streams where I spea

Gergely Radics 0 Jan 8, 2022
A dynamic docker->redis->traefik discovery agent

traefik-kop A dynamic docker->redis->traefik discovery agent. Solves the problem of running a non-Swarm/Kubernetes multi-host cluster with a single pu

jitter.dev 39 Dec 23, 2022
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

null 0 Oct 19, 2021
Reworking kube-proxy's architecture

Kubernetes Proxy NG The Kubernetes Proxy NG a new design of kube-proxy aimed at allowing Kubernetes business logic to evolve with minimal to no impact

Kubernetes SIGs 185 Jan 3, 2023
Rest API for todoapp written in Golang, using clean architecture, CI/CD

todoapp-backend Rest API for todoapp written in Golang, using Clean Architecture and CI/CD (includes unit tests and integration tests). Using: Web fra

Đạo Phạm 7 Oct 23, 2022
Lightweight, single-binary Backup Repository client. Part of E2E Backup Architecture designed by RiotKit

Backup Maker Tiny backup client packed in a single binary. Interacts with a Backup Repository server to store files, uses GPG to secure your backups e

RiotKit 1 Apr 4, 2022
Cheiron is a Kubernetes Operator made with OperatorSDK for reconciling service account and attaching imagePullSecrets to service accounts automatically

anny-co/cheiron NOTE: Cheiron is currently in very early stages of development and and far from anything usable. Feel free to contribute if you want t

anny 2 Sep 13, 2021
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests

crud crud is a CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service docum

Piyush Jajoo 0 Nov 29, 2021
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.

HashiCorp 13k Jan 5, 2023
⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP

Your new microservice development environment friend. This CLI tool allows you to define a configuration to work with both local applications (Go, Nod

Vincent Composieux 1.3k Jan 4, 2023
Microservice we use to post reddit posts to a webhook

TypicalBot Reddit Webhook Poster Microservice we use to post reddit posts to a webhook. How to run The SHARED_API environment variable is to hook into

TypicalBot 1 Dec 5, 2021
Emojivoto - A microservice application that allows users to vote for their favorite emoji

Emoji.voto A microservice application that allows users to vote for their favori

Kriil 0 Feb 16, 2022
Covering basics of Go by writing practical running code. microservice-http server-DAO-Kafka

go1 Covering all basics of Go by writing practical running code. Prerequisite: basic knowledge of c programming language as go is very similar to c in

Zeeshan Ashraf 4 Mar 30, 2022
A Golang based high performance, scalable and distributed workflow framework

Go-Flow A Golang based high performance, scalable and distributed workflow framework It allows to programmatically author distributed workflow as Dire

Vanu 691 Jan 6, 2023