Giter VIP home page Giter VIP logo

alibaba / nacos Goto Github PK

View Code? Open in Web Editor NEW
29.1K 908.0 12.6K 55.22 MB

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.

Home Page: https://nacos.io

License: Apache License 2.0

Java 98.95% Shell 0.06% Batchfile 0.04% JavaScript 0.08% TypeScript 0.04% SCSS 0.81% EJS 0.02%
nacos dubbo alibaba kubernetes istio spring-cloud microservices service-mesh configuration-management distributed-configuration

nacos's Issues

batch get config

配置中心这块,能否提供批量获取多个dataId的api?

Console(UI) support for naming service

Major features for console of naming service have been discussed in Nacos team. For the first release of naming console, below features are expected to be supported:

  1. Service list panel.
  2. Service detail panel and operations on service, cluster and IP.

Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce

mvn install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.
4.1:enforce (enforce-ban-circular-dependencies) on project nacos-all: Execution
enforce-ban-circular-dependencies of goal org.apache.maven.plugins:maven-enforce
r-plugin:1.4.1:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-pl
ugin:1.4.1 or one of its dependencies could not be resolved: Failure to find org
.apache.maven.enforcer:enforcer-rules:jar:1.4.1 in http://repo.maven.apache.org/
maven2 was cached in the local repository, resolution will not be reattempted un
til the update interval of central has elapsed or updates are forced -> [Help 1]

Please vote and comments for Nacos console UI theme&style

The community decided to add a console to the Nacos 0.3 version, and now collects a console-style design draft.

Console-style design draft should have:

  1. The Nacos logo should be included on the console.
  2. Clear style, suitable for programmers.
  3. The interaction design is simple and practical.
  4. Have a link to Nacos's official website.

The community will vote on all the candidates.

we need to create and maintenance a core performance benchmark for nacos

Description

To delivery a product with perfect performance to users,we need to create and maintenance a core performance benchmark for Nacos,especially for our “push” mechanism and data consistency convergence efficiency.

What to do

  • Design a meaningful performance baseline scenario
  • Develop benchmark tools and give a public standard test data set
  • Give a professional performance report
  • Keep performance tuning ...

Describe the solution you'd like
TO PLAN

Describe alternatives you've considered
N/A

Additional context
N/A

Coding Guidelines

According to 《Alibaba Java Coding Guidelines》, the interface should not have the public modifier.
e.g.
com.alibaba.nacos.api.config.ConfigService.java

public interface ConfigService {

	public String getConfig(String dataId, String group, long timeoutMs) throws NacosException;

	public void addListener(String dataId, String group, Listener listener) throws NacosException;

	public boolean publishConfig(String dataId, String group, String content) throws NacosException;

	public boolean removeConfig(String dataId, String group) throws NacosException;

	public void removeListener(String dataId, String group, Listener listener);

}

麻烦问下发布计划

看介绍目前0.1.0只支持http服务注册及发现,现在想知道后续的0.2.0,0.3.0,0.4.0的发布计划,谢谢。

Still can get the instance after deregister the instance

While debug the nacos client, after I register the instance, there is one cache file generated in user's home folder like /home/jason/nacos/naming/default/com.mh.nacos010.helloWorldService.
Later I call the deregister method to deregister the instance, but I can still get the instance by the getAllInstances method, after check I found that the cached file not removed, so when execute getAllInstances it will first get from local disk cache.
Is this feature designed like this?

vipserver's pull and push mechanism performs poor comparing with longpulling

每隔一秒以阻塞的形式排队拉取所有的domain信息,假设在服务发现场景,某个应用依赖了100个服务,
每秒种要创建100个短连接拉取,一方面客户端开销大,另外一方面服务端查询压力也大;

换成http2在一个连接上以非阻塞形式完成推拉的所有工作,情况会好很多;自定义非阻塞的双工协议也能起到同样的效果,但这都会增加client的依赖,不比jdk原生的httpclient好

如果采取diamond的longpulling形式,通过md5或者lastRefreshTime比对,每次都可以批量发送domain,是否可行?

Cluster node health check abnormality

Reporting bugs

This error caused the notification to be abnormal:

19:44:10,648|11.163.128.34|yanlin|yanlin|null|null|1536827026525|11.163.128.34|notify|unhealth|0|10.101.109.214:8080

  • Specific
    Health check url error,now is /nacos/health,should be /nacos/v1/cs/health

The usage of example

How do we use the example code?
Also, following the installation, how do we verify the service is up and running?

Is the opensource version has support session cluster and data cluster?

我想请问下,目前开源的这个版本是否已经支持将服务端集群拆分为会话集群和数据集群了。

Excuse me, I just want to know if the current opensource version has support the server cluster to be divided into two seperated cluster, as session cluster and data cluster, if not, do you have a future plan.

There is an error in the sample code for the SDK document

I write demo through nacos's sdk. There is an error exist in sample code.

NamingService naming = NamingFactory.createNaming(System.getProperty("serveAddr"));
naming.subscribe("nacos.test.3", event -> {
    if (event instanceof NamingEvent) {
        System.out.println(((NamingEvent) event).getServceName());
        System.out.println(((NamingEvent) event).getInstances());
    }
});

There is no method getServceName for class NamingEvent.

Get wrong instance list at first time

How to reproduce this issue, refer to followings:

  1. I have registered 2 instances (ex service name are all 'a') to nacos server
  2. Then I stop them
  3. After a while, I do step 1 again
  4. Then I get 2 instances from interface, for first time, it returns 1 instance or 0 instance. But I invoke again, it is fine to return 2 instances. Guess the cache issue?

Only one instance returned when invoke getAllInstance method

Test the nacos client:
I register 2 instances with same service name, IP but different port number.
e.g.
com.mh.nacos010.helloWorldService 127.0.0.1 80
com.mh.nacos010.helloWorldService 127.0.0.1 81

After invoke registerInstance method, I checked the server side, the instance list have been written to
com.alibaba.nacos.naming.iplist.com.mh.nacos010.helloWorldService
Later I invoke the getAllInstanceMethod, but only one instance returned:
code sample:

String serverAddr = "127.0.0.1:8080";
		String serviceName = "com.mh.nacos010.helloWorldService";
		NamingService naming = NamingFactory.createNamingService(serverAddr);
		List<Instance> list = naming.getAllInstances(serviceName);
		if (list != null && !list.isEmpty()) {
			for (Instance ins : list) {
				System.out.println(ins.getInstanceId());
				System.out.println(ins.getIp());
				System.out.println(ins.getPort());
				System.out.println(ins.getWeight());
				System.out.println(ins.getClass());
				System.out.println(ins.isHealthy());
			}
		}

return sample:

127.0.0.1-80-DEFAULT-com.mh.nacos010.helloWorldService
127.0.0.1
80
2.0
class com.alibaba.nacos.api.naming.pojo.Instance
true

Only port number with 80 was returned.

My question:
Is nacos server already have load balance to provide only one available instance to client?

It is recommended to communicate in English as much as possible (建议尽量使用英语沟通所有的需求和评论)

为了未来更方便的将Nacos推进到CNCF或者Apache社区孵化,我们恳求大家尽量
用英文发proposal,issue或者comments等,尤其是高质量的那些。(当然,仍然是非强制的)

如果您觉得中文交流更舒服,作为一个建议,您可以尝试在中文的后面加上简单的英语摘要。

In order to promote Nacos to the CNCF or Apache community more conveniently
in the future, we beg you to publish the proposal,issue or comments in English,Especially those of high quality (Of course, it is still non-mandatory).

If you feel that Chinese communication is more comfortable, as a suggestion, you can try to add a simple English summary.

Frequent heartbeat log prints

Please refer to log file, you can find a lot of hearbeat logs print in a very short time:

discovery 2018-09-17 20:13:41,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:13:41,924 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:13:51,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:13:51,925 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:01,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:01,925 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:01,994 INFO [com.taobao.vipserver.serverlist.updater] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] server list provided by user: [localhost:8080]
discovery 2018-09-17 20:14:11,924 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:11,925 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:21,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:21,925 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:31,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:31,924 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:31,995 INFO [com.taobao.vipserver.serverlist.updater] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] server list provided by user: [localhost:8080]
discovery 2018-09-17 20:14:41,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:41,924 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&
discovery 2018-09-17 20:14:51,923 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:107] - [BEAT] [] [] send beat to server:
discovery 2018-09-17 20:14:51,924 INFO [com.alibaba.nacos.naming.beat.sender] c.a.n.c.naming [Slf4jLogger.java:99] - [] [] [] Request from server: http://localhost:8080/nacos/v1/ns/api/clientBeat?beat=%7B%22cluster%22%3A%22DEFAULT%22%2C%22dom%22%3A%22discovery-springcloud-example-b%22%2C%22ip%22%3A%22192.168.0.107%22%2C%22port%22%3A5201%7D&encoding=UTF-8&dom=discovery-springcloud-example-b&

Stand-alone mode gets the change history list exception

exception:
select count(*) from his_config_info where data_id = ? and group_id = ? and tenant_id = ? order by nid desc Borrow prepareStatement from pool failed

  • Specific.
    Stand-alone mode gets the change history list exception

project orientatio

想知道这个项目在整个微服务体系中的定位是什么?服务发现?还是配置中心?我看好像两者都有,但是不知道重点是什么。我的理解配置中心和服务发现应该侧重点是不同的。还有,配置中心部分我看SDK的代码跟阿里之前开源的diamond很像,不知道是否配置中心就是之前diamond的升级版本?

config management or Registry Center?Relationship with diamond?

Class NamingFactory doesn't support createNaming method?

I write demo through nacos's sdk. The example code like below.
NamingService naming = NamingFactory.createNaming(System.getProperty("serveAddr")); naming.registerInstance("nacos.test.3", "11.11.11.11", 8888, "TEST1");
But class NamingFactory doesn't support this method, it only has createNamingService method.

DNS protocol support for naming service

In order to integrate Kubernetes and support standard DNS resolution for registered services, We need build a DNS server in Nacos. Proposed features are listed below:

  1. Standard A record query.
  2. Support forwarding to external DNS servers.
  3. Use Nacos as backend.
  4. Use Kubernetes as backend and be qualified for Kubernetes DNS baseline.
  5. Use Kubernetes labels as optional source for Load-Balance.

disconnect message show

Nacos Server stop or network is not work,Client don`t show disConnect message through the log.

The config module is deployed separately and the schema.sql cannot be found.

The config module is deployed separately and the schema.sql cannot be found. trace:
BOOT-INF/classes/schema.sql
Users/water.lyl/Documents/code/nacos-0.3.0/config/target/nacos-config.jar!/BOOT-INF/classes!/schema.sql (No such file or directory)

  • Specific.
    Nacos-config reached the jar package can not run

Optimized log framework

Currently nacos uses the internal log framework of Ali Group. There is no open source version for continuous maintenance, and it is not conducive to open source co-construction. Therefore, it needs to be changed to slf4j.

BeatProcessor's run method can be never executed

executeService是个singleThreadExecutor,BeatProcessor内部while (true)自旋
BeatTask的run方法是永远没有机会执行的,这个是故意的呢还是设计错误?

class BeatProcessor implements Runnable {

        @Override
        public void run() {
            while (true) {
                try {
                    for (Map.Entry<String, BeatInfo> entry : dom2Beat.entrySet()) {
                        BeatInfo beatInfo = entry.getValue();
                        executorService.schedule(new BeatTask(beatInfo), 0, TimeUnit.MILLISECONDS);
                        LogUtils.LOG.info("BEAT", "send beat to server: ", beatInfo.toString());
                    }

                    TimeUnit.MILLISECONDS.sleep(clientBeatInterval);
                } catch (Exception e) {
                    LogUtils.LOG.error("CLIENT-BEAT", "Exception while scheduling beat.", e);
                }
            }
        }
    }

    class BeatTask implements Runnable {
        BeatInfo beatInfo;

        public BeatTask(BeatInfo beatInfo) {
            this.beatInfo = beatInfo;
        }

        @Override
        public void run() {
            Map<String, String> params = new HashMap<String, String>(2);
            params.put("beat", JSON.toJSONString(beatInfo));
            params.put("dom", beatInfo.getDom());

            try {
                String result = serverProxy.callAllServers(UtilAndComs.NACOS_URL_BASE + "/api/clientBeat", params);
                JSONObject jsonObject = JSON.parseObject(result);

                if (jsonObject != null) {
                    clientBeatInterval = jsonObject.getLong("clientBeatInterval");

                }
            } catch (Exception e) {
                LogUtils.LOG.error("CLIENT-BEAT", "failed to send beat: " + JSON.toJSONString(beatInfo), e);
            }
        }
    }

can't download package

why I can't download this zip package?

or

I download source and "mvn -Prelease-nacos clean install -U " failed too.

这代码质量感觉一般啊

rt
healthcheck 里面的 ExecutorService 到处都是, UtilsAndCommons 里面的 ScheduledExecutorService 也是, 这种系统 thread 必须要做到可知、可控、可调啊

另外重点看了一下 Raft, 感觉质量一般,有点乱啊

lift the speed of service registry/discovery opensource

动态配置和dns软负载亲测可用,分别对应了阿里内部两款牛逼的产品
Dynamic config service && dns soft loadbalance are very nice,corresponding to two classic middleware in alibaba.

我们非常赞赏阿里配置/软负载/服务发现注册大一统的目标
We appreciate the great goal of unifing config/loadBalance/service-registry products

服务注册/发现这块市面上无重量级产品可用,抓紧开源,給中小企业带来福音
Excellent service-registry middleware can be rarely seen in community,please lift the
speed of opensource, thus small and medium enterprise can benefit from it as soon as possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.