Comments (8)
This is a difficult one
from spring-cloud-gateway.
Can you tell why this is difficult?
The only possible reasons I can see are:
- Timeouts
- Things like Server Sent Events (SSE), Streaming, WebSockets. (basically every thing with infinite data streams)
Or is there something wrong/missing/impossible with multipart/mixed
?
If the problem is the CPU load / memory usage for the API Gateway, because it could take a huge amount of memory to buffer all the response data while waiting for the slower requests to finish. Then multipart/parallel
might come in handy.
EDIT: Here's an example of Gmail's implementation: https://developers.google.com/gmail/api/guides/batch
from spring-cloud-gateway.
Long running connections wouldn't be possible. Usually, this gets into business logic and ends up as with some kind of dynamic programming in properties. It would have to avoid that kind of thing.
from spring-cloud-gateway.
The difference with gmail is the only endpoints that can go in the batch are other gmail endpoints and batch knows the limitiations. This would be the difficult part, or the part that would need to be documented well.
from spring-cloud-gateway.
Yeah, that's completely true.
But I'd add this: The API User is still a human who must think about what he/she's doing! Doesn't matter if he/she calls lot's of single endpoints or a batch endpoint.
I think that Spring API Gateway knows all its endpoints, too. Or am I wrong here?
Maybe this feature could be added as an extremely simple proof of concept. With a huge BETA note. In the first iteration it could simply accept every multipart request and execute it. Later on properties could be added to whitelist or blacklist certain requests, specify timeouts, etc.
from spring-cloud-gateway.
This pattern is used a lot in a distributed architecture.
Something should be done to make this task easier and take advantage of Spring Gateway.
from spring-cloud-gateway.
I think our current advice for this is a Backend For Frontend or use the spring-cloud-gateway-webflux module to write a controller that does this in the gateway (using a forward:/<controller>
route.
from spring-cloud-gateway.
I think our current advice for this is a Backend For Frontend or use the spring-cloud-gateway-webflux module to write a controller that does this in the gateway (using a
forward:/<controller>
route.
I have done a lot of research about Api Gateway Pattern.
-
I think we should avoid to do aggregation works including business logics in the gateway. The problem mentioned at Overambitious API gateways by Thoughtworks Rader
-
BFF aims at different user experience clients. Adding a BFF concept and managing it would be an overhead if you just want to optimize the comunication latency caused by multiple requests through WAN.
-
Microsoft Graph Docs shows the batch api which follows OData Batching Request Specification, I think this is the right way and important feature for gateway product.
-
There is an opening issue about this feature in Kong/kong, but it is not implemented yet.
I am so confused, why batching request/batching proxy is not proposed as a microservice gateway pattern clearly ?
According to many similar ariticles about gateway, Api Gateway Pattern is different from Batching Request/Batching Proxy Or is not clear enough to lead you to this practice.
from spring-cloud-gateway.
Related Issues (20)
- Remove concatMap in lookupRoute to improve throughput
- Document that paths in route uri's are ignored
- Support paths on Route URIs as syntactic sugar for the `SetPath` filter
- Remove deprecated properties in XForwardedRequestHeadersFilter
- Is it possible to merge the response header and response body received by the client from the gateway, which are analyzed separately through TCP packet capture HOT 2
- Gateway MVC: Calling the Wiremock service results in a java.io.IOException: EOF reached while reading. HOT 4
- Temporarily remove OkHttp support in Spring Cloud Gateway Mvc? HOT 1
- Make WeightCalculatorWebFilter random supplier aware of ServerWebExchange
- Missing redis-route-definition-repository property metadata HOT 14
- Unknown reason triggers .doOnCancel(() -> cleanup(exchange)) in NettyWriteResponseFilter occasionally HOT 6
- Add CORS functionality to spring cloud gateway mvc HOT 2
- When CorsGatewayFilterApplicationListener is used, vary is included in all routing response headers HOT 3
- RequestBody Modify is not working and Option to read and update response HOT 3
- Allow customizing ClientHttpRequestFactory including using insecure trust manager HOT 3
- Connection has been closed BEFORE send operation HOT 4
- Why Remove Content-Length in Gateway MVCïŒ HOT 3
- Directly added gateway filters bypass setting of correct order HOT 2
- Add properties to disable filters if needed
- Disable Apache client5 cookie manager by default HOT 4
- Disabling CSRF future not work with spring security in spring gateway mvc. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-gateway.