Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixiu Control Plane Support Service Search #487

Open
AlbumenJ opened this issue Sep 8, 2022 · 16 comments
Open

Pixiu Control Plane Support Service Search #487

AlbumenJ opened this issue Sep 8, 2022 · 16 comments
Assignees

Comments

@AlbumenJ
Copy link
Member

AlbumenJ commented Sep 8, 2022

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

@AlbumenJ
Copy link
Member Author

AlbumenJ commented Sep 8, 2022

服务查询这块的功能主要是需要提供一个查询当前集群所有服务信息的接口,类似 Dubbo Admin 的服务查询功能。具体到我们控制面需要做的就是提供一个 proto 包括了所有必要的数据,数据类似 xds 的数据,但是是以一个管控的视角去设计的。可以要跑一个 dubbo admin 体验下那个功能。

@zgq25302111
Copy link
Contributor

我觉得任务需要细化下。怎么做还不清楚。

@zgq25302111
Copy link
Contributor

我先体验下 dubbo admin

@zgq25302111
Copy link
Contributor

I’m working on it

@zgq25302111
Copy link
Contributor

zgq25302111 commented Sep 18, 2022

@zgq25302111
Copy link
Contributor

dubbo-admin is running

@zgq25302111
Copy link
Contributor

本周无进展。下周会赶进度。

@zgq25302111
Copy link
Contributor

zgq25302111 commented Oct 30, 2022

@zgq25302111
Copy link
Contributor

zgq25302111 commented Nov 13, 2022

上周和本周无进展。具体实现细节还需咨询远云

@zgq25302111
Copy link
Contributor

在看 dubbo admin 关于 service search 功能的代码实现。应该是这个函数 List findByService(String serviceName);
在阅读代码,有问题也会咨询远云。

@zgq25302111
Copy link
Contributor

zgq25302111 commented Dec 11, 2022

本周无进展。我目前在该问题上可以投入的时间少,请求其他同学支持。
先退出一下会议。

@shawnh2
Copy link
Contributor

shawnh2 commented Feb 6, 2023

I'm working on it.


体验了一下 dubbo-admin 的服务查询功能,对应到此处就相当于在 dubbo-admin 中输入*查找所有服务(*代表所有服务)。

查询的结果就是服务的基础信息,包括:服务名、组、版本、应用,并且可以通过三种不同的查询模式进行查询(服务名、IP地址、应用)。


需要确认的是,pixiu 的服务查询能力是只针对上述的服务基础信息,还是说也针对如下图所示的 provider/consumer 信息和元数据信息?

image

CC @AlbumenJ , PTAL.

@shawnh2
Copy link
Contributor

shawnh2 commented Feb 7, 2023

那我先按照自己的理解进行设计了,若有不妥请及时指正。


关于 service_search 的 proto 设计如下:

syntax = "proto3";

package istio.extensions.v1alpha1;

option go_package="istio.io/api/extensions/v1alpha1";

message ServiceSearch {

    string service_name = 1;

    string application_name = 2;

    string group_name = 3;

    string version = 4;
}

借鉴 dubbo-admin 服务查询的功能,可将「服务查询」这个服务的 proto 设计为如下所示:

syntax = "proto3";

package dubbo.networking.v1alpha1;

option go_package = "istio.io/api/dubbo/v1alpha1";

service ServiceSearchService {
    rpc Get(GetServiceSearchRequest) returns (GetServiceSearchResponse);
}

message GetServiceSearchRequest {

    string pattern = 1;  // 存在按照服务名、IP地址、应用三种模式的查询

    string filter = 2;  // 查询匹配字段,值为 `*` 表示返回所有服务
}

message GetServiceSearchResponse {
}

@shawnh2
Copy link
Contributor

shawnh2 commented Feb 9, 2023

仍需要明确的几个点:

  1. 此「服务查询」功能应是消费端去主动获取的,消费端只需给出必要的参数。服务查询是从三种模式(服务名、IP地址、应用)来做的,参考 dubbo-admin 相关方法:
    https://github.com/apache/dubbo-admin/blob/4836ee0c0fc3fdb74449fdaf749d5b04a699dba8/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java#L67-L70

  2. 上述三种模式(服务名、IP地址、应用)的信息是通过服务启动时,上报至控制面的,通过控制面注册到 k8s CRD 中。
    那是否还需要在控制面增加监听器,监听服务的上下线呢?

  3. 这三种查询模式(服务名、IP地址、应用)的设计有相关的参考资料吗?

@zgq25302111
Copy link
Contributor

可以通过钉钉联系下远云,刘军。

@AlexStocks
Copy link
Contributor

仍需要明确的几个点:

  1. 此「服务查询」功能应是消费端去主动获取的,消费端只需给出必要的参数。服务查询是从三种模式(服务名、IP地址、应用)来做的,参考 dubbo-admin 相关方法:
    https://github.com/apache/dubbo-admin/blob/4836ee0c0fc3fdb74449fdaf749d5b04a699dba8/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java#L67-L70
  2. 上述三种模式(服务名、IP地址、应用)的信息是通过服务启动时,上报至控制面的,通过控制面注册到 k8s CRD 中。
    那是否还需要在控制面增加监听器,监听服务的上下线呢?
  3. 这三种查询模式(服务名、IP地址、应用)的设计有相关的参考资料吗?

@AlbumenJ 对此三点进行详细回复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

4 participants