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.

Where Next?

Popular Backend topics Top

Kurisu
Hello, Please, let’s say I have a website with user authentication made with Elixir/Phoenix, and now want to add a forum to it (using a ...
New
joshi
Hey everybody! I’m working on the project that includes import of Oracle data to PostgreSQL. That data comes as Oracle export (expdp) fi...
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
conradwt
Hi, I’m building an application that will have support for both the web and mobile. At this time, I’m using PhxGenAuth for authenticatio...
New
Ora2pgnewbie
Wanted to check if there is a UI available to use Ora2pg tool.
New
Fl4m3Ph03n1x
Background I am a fan of dialyzer and friends (looking at Gradient) and I try to have sepcs in my code as much as I can. To this end, I a...
New
harwind
I have a large SQL database with millions of records, and I’ve identified duplicate entries. What’s the most efficient way to find and re...
New
ogoldberg
Any recommendations on good resources for learning Elixir, Phoenix, and Ash?
New
pillaiindu
What is the difference between using :references and :belongs_to in the following command? bin/rails generate scaffold LineItem product:...
New
apoorv-2204
Anyone know how to get in golang? I am from elixir background?.
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
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
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1143 25883 760
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
New