sampu

sampu

Keep Alive data packets configuration with Spring Webflux endpoint

I have a use case where a client is invoking a Rest endpoint via a load balancer, which in turn invokes a third party endpoint which is really slow to respond. The third party endpoint takes over 1 min to start sending the response. Because of this the client is getting 504 Gateway timeout due to the connection being idle for more than 60 seconds. We don’t want to alter the configuration of load balancer’s keep alive timeout rather want the Rest endpoint to send some keep alive data packets periodically till the data from third party endpoint is available ensuring that the connection is not idle for long time.

I can implement this by generating a Flux which periodically checks for data availability and returns a dummy packet till the data from third party endpoint is available.
Wanted to know if the same can be achieved just with some out of the box configuration. The goal is to just ensure that the connection does not remain idle till we have data available from the third part endpoint

Most Liked

OvermindDL1

OvermindDL1

You could have the rest endpoint send back empty http chunk responses, say, every 30 seconds? It’s not out of the box (as a load balancer generally should be configured to handle the backend correctly) but it’s pretty trivial to do.

Popular Backend topics Top

AstonJ
Another BEAM language… The Hamler Programming Language Hamler is a strongly-typed language with compile-time typechecking and built-in...
New
bot
Kotlin v1.4.0 has been released. Link: Release Kotlin 1.4.0 · JetBrains/kotlin · GitHub
New
ariandanim
Hello, i am facing difficult using webpack when to install within phoenix framework 1.5.7 because the webpack is still version 4.x.x inf...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
AstonJ
More cool tech inspired by <span class="hashtag-icon-placeholder"></span>erlang :nerd_face: By combining the fault-tolerance and massiv...
New
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
PragmaticBookshelf
Learn Functional Programming by building a complete web application that uses Kotlin, TDD with end-to-end tests, and CQRS and Event Sourc...
New
ManningBooks
Dodge the common mistakes that even senior developers make, take full advantage of static analysis tools, and deliver robust and error-fr...
New
PragmaticBookshelf
Build fast, scalable PostgreSQL and Rails apps. Solve data growth, quality, and reliability challenges, for workloads from consumer Inter...
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New