I have my API gateway and all my microservices up and running in cloud foundry, and here's my configuration for the API gateway:
zuul.add-proxy-headers=true
zuul.routes.myservice.path=/ptp/myService/**
zuul.routes.myservice.url=${CLIENT_BASE_URL:http://localhost:8877/}/myservice
zuul.routes.myservice.sensitiveHeaders=
zuul.host.connect-timeout-millis=60000
zuul.host.socket-timeout-millis=60000
# Increase the Hystrix timeout to 60s (globally) hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
ribbon.ConnectTimeout=60000
ribbon.ReadTimeout=60000
The problem is that when I try to reach out to my microservice the first time after being idle for some time, I see a connection reset error logged into the API gateway. I don't see anything logged in my client service.
But the same call is successful if I refresh my browser, or if I'm calling the service again.
Related
I have AWS API GW in WebSocket mode with HTTP integration(not proxy mode).
The problem is that my service can return any response code for the $connect endpoint but API GW always establishes a connection with a client.
But in the documentation I see this:
Until execution of the integration associated with the $connect route is completed, the upgrade request is pending and the actual connection will not be established. If the $connect request fails (e.g., due to AuthN/AuthZ failure or an integration failure), the connection will not be made.
We are working on the ASP.Net core API application. In this application, we have a SignalR module for notification. We planned to host the application in the AWS environment. We have used the AWS lambda service to host the API, and also the WebSocket API gateway to consume the notification/SignalR part.
We are facing an issue with connecting the notification URL.
When we tried to connect the Web socket URL from Commandline using Node, it is showing "Unexpected server response 403".
When we tried to consume the URL from the frontend application, it showed the below error.
"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. ."
We are stuck with this issue. Any help to resolve this issue would be appreciable.
I am coding a notification system. The clients will get notification from the server by http-long-polling(Spring async requests with DeferredResult). Now I need to limit the total connection the server can hold and the max connection count a client should keep. All connections out of quota will be reject with status code 429 to many reuqests.
I am trying to do this with spring-cloud and zuul. But I have no idea about hou to intecept the lifecycle of an async request with zuul.
I have a Jersey client and server. And I see this behavior:
In client I post a request
In the server I see the request and start to handle it
Then out of a sudden I receive an empty response with status 504 to the client while the server still processes the request
I've set the client properties to have read and connect timeouts much higher than the time I get the empty response
After further analysis - the gateway timeout was due to a Load-Balancer between the client and the server.
Reconfiguring the timeout in the Load-Balancer solved the issue
I have what appears to be a race condition related to losing responses coming from my heroku web service.
The heroku router delivers the request to the web service, the web service processes the request and returns a response, but in the interim the heroku router fails the request, either due to client (interrupt) or backend timeout.
The problem is that the web service request processing changed state on the backend and expected to send the state change to the client in the body of the response. The response never gets to the client, therefore the state change is lost forever.
The state change in my case happens to be the delivery and removal of a message from a RabbitMQ message queue. The web service request handler pops the request from the RabbitMQ queue, but it fails to reach the client and is never heard of again.
I could implement my own client-based message ACK system to mitigate this. However, I suspect that some of you might have a better solution regarding how to deal with ensuring that the responses get to the client. Is there any callback that I can use on my web service to determine if the response was lost? FWIW my web service is a JAX-RS service running embedded Jetty.
Thanks!