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

featrue: implement Aggregate request function #603

Closed
soulsoul opened this issue Sep 26, 2019 · 9 comments
Closed

featrue: implement Aggregate request function #603

soulsoul opened this issue Sep 26, 2019 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@soulsoul
Copy link
Member

Assemble the data of two or more backend interfaces and return it as one interface.
The first parameter mapping requirement, the development of plugins should be no problem, but want to know whether there are ready-made plugins can support it?

将两个或者两个以上上游接口的数据组装起来,作为一个聚合请求接口的数据返回。

@moonming
Copy link
Member

APISIX not have this kind of plugin yet, I think it's useful, welcome PR.

@membphis membphis added the enhancement New feature or request label Sep 26, 2019
@soulsoul soulsoul self-assigned this Sep 29, 2019
@Beckjiang
Copy link
Contributor

Assemble the data of two or more backend interfaces and return it as one interface.
The first parameter mapping requirement, the development of plugins should be no problem, but want to know whether there are ready-made plugins can support it?

将两个或者两个以上上游接口的数据组装起来,作为一个聚合请求接口的数据返回。

I have the same demand. How is your project progress now?

@membphis
Copy link
Member

we can use cosocket + resty-http to implement this.

@Beckjiang
Copy link
Contributor

About the request, it could be in two modes "pipeline" or "parallel".

The "pipeline" mode is easy to implement by httpc:request_pipeline. But what about the "parallel" mode? ngx.thread.spawn + resty-http?

@moonming
Copy link
Member

why we need parallel mode? cosocket will not block request.

@Beckjiang
Copy link
Contributor

I think It is a way to reduce the total response time.

A similar question.
https://groups.google.com/forum/#!msg/openresty/ro8DmOdvXe8/66S-W0yGCAAJ

@membphis
Copy link
Member

httpc:request_pipeline is good enough.

@Beckjiang
Copy link
Contributor

well. I will try it. thx.

@membphis
Copy link
Member

fixed #1388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants