Kubernetes Gateway API request chaining - kubernetes

is it possible to chain requests through multiple backends with the new https://gateway-api.sigs.k8s.io/ ?
The idea is to have a flow depending on the response headers of each service ie:
Request -> Gateway -> [ first backend service "Custom forward Header" -> second backend service -> "Custom forward Header" -> x service ] -> Response

Related

How to use 1 external port for 3 applications

I Have a 3 applications,
React Front using NextJs
Spring rest API
WildFly server
But so I only have one external port available, I can use some proxy or gateway to access my applications?
I saw Spring cloud Gateway, could run on my external port and redirecting the request for the correctly app? Or is there a better way?
Like this:
Request ip:8433/app1 -> localhost:9000
Request ip:8433/app2 -> localhost:9001
Request ip:8433/app3 -> localhost:9002
Edit One, Spring cloud Gateway code:
#Bean
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
return builder.routes()
.route("API", r -> r.path("/api/**").uri("http://localhost:8084"))
.route("UI", r -> r.path("/ui/**").uri("http://localhost:3000"))
.route("WILDFLY", r -> r.path("/wildfly/**").uri("https://localhost:8087/wildfly"))
.build();
}

Forward generated token to microservices

How can I tell to the Zuul APi gateway to forward the token (JWT generated by this last one) to the requested microservices.
Thanks
As in: Zuul -> Eureka Server, Basic Authentication issue
zuul.sensitiveHeaders: Cookie,Set-Cookie

Zuul RibbonRoutingFilter Content-Encoding gzip response

In our setup, We are accessing the Node JS server thorough ZUUL and Sidecar.
When we invoke the java scripts resources with Accept-Encoding=[gzip] header, Node JS returns compressed file with Content-Encoding=[gzip] header. But if the same request is routed through Zuul we are getting a decompressed response.
Based on our analysis we found that
When the request is forwarded to downstream systems based on service id, zuul is using the ribbon load balanced routing filter. In this process, the apache HTTP client removes the below headers from response in ResponseContentEncoding class
o "Content-Length"
o "Content-Encoding"
o "Content-MD5"
Because of that the content is automatically decompressed in zuul and send it to the caller.
When the request is forwarded to downstream systems based on URL, zuul is using simple host routing filter. In this flow, disableContentCompression method is used while building the HTTP client so the content is sent to the caller without decompressing.
Please let me know of any specific reason for not using disableContentCompression in ribbonloadbalancedroutingfilter route and let me know of any workaround to resolve this?
Environment :
Spring Cloud version: Dalston.SR2
Spring Boot: 1.5.4.RELEASE

SSL endpoint not responding -> secure.eu-de.bluemix.net

According to Bluemix Doc this -> secure.eu-de.bluemix.net -> is the regional endpoint for public Bluemix in Germany - however it seems not to responding.

Generic Paths with AWS API Gateway

Let's say I have a RESTful web service with the following API:
/
/things
/v2
/heartbeat
GET
/stuff
GET
POST
...
This service is running in an AWS Elastic Beanstalk behind an AWS API Gateway. The service itself handles routing beyond the /things path so I don't want to duplicate this routing logic in the API Gateway configuration. Is there a way I can setup my AWS API Gateway to handle any request that is /things and pass that to my service where the service will then handle routing to the correct path and method?
In other words, my API Gateway would handle a request to https://myUrl.com/things/v2/heartbeat and another request to https://myUrl.com/things/v2/stuff using the same /things resource defined in my API Gateway rather than having to define the /heartbeat and /stuff resources in the API Gateway itself.
You can use API Gateway's catch-all path variable to do that.
In your case, you'd have an method of type ANY, with the path /things/{proxy+}
The Endpoint URL you'd use would be something like: https://api.yourbackend.com/{proxy}
Here is a screenshot showing an example HTTP proxy integration in the API Gateway console:
This blog post has more details and screen shots:
https://aws.amazon.com/blogs/aws/api-gateway-update-new-features-simplify-api-development/