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

ohm
Does anybody have good learning resources with regards to going into Event Driven Design, Architecture or Sourcing? I got recommended Er...
New
TwistingTwists
Hello Folks, I am a novice developer from India. Intending to learn Elixir and web apps (phoenix framework). What are things that I MUS...
New
sampu
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 r...
New
Fl4m3Ph03n1x
Background I am trying to up my Functional Programming (FP) skills and one of the things that newcomers first learn in FP is the Option T...
New
jeya
Dear Geeks I am new to pytest. I am following a youtube channel. I am writing the same code. learning to test login functionality of an...
New
AstonJ
If when trying to create (or recreate) your dev db with rails db:create you are getting: PG::ConnectionBad: connection to server on soc...
New
Fl4m3Ph03n1x
Background I have a personal project that is an elixir desktop application for PC Windows. It works pretty well, but now I want to give i...
New
harwind
I received this error for a binary search programme in C, despite the fact that it requested for inputs and produced the right output. Th...
/c
New
Fl4m3Ph03n1x
Background I have a module that uses TypedStruct to create structs. This is the code: defmodule Shared.Data.Authorization do @moduledo...
New
ogoldberg
Any recommendations on good resources for learning Elixir, Phoenix, and Ash?
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
AstonJ
Or looking forward to? :nerd_face:
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
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
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
New