How to call 2 backends -1 synchronously and another one asynchronously

12 views
Skip to first unread message

Velmurugan M

unread,
Jul 9, 2025, 6:17:55 AMJul 9
to KrakenD Community
Hi All , I am trying to find a way with KrakenD CE for calling 2 backends REST APIs. , one synchronously and serve to client and another asynchronously to fire and forget. This means , client request should not wait for both the response , when synchronous response has come , it should respond back to the client. I tried the follow options but I couldn't figure it out.
  1. I used Lua scripts to call another service using "pre" but I understand this is synchronous , i mean this is blocking process and it is not calling the backend until this request is completed.
  2. I saw this
      using "async": true inside the backend’s extra_config (under github.com/devopsfaith/krakend/proxy) ensures KrakenD:
  • Sends the request to that backend asynchronously.
  • Does not wait for the response.
  • Continues processing and returns the API response without delay.
  •  (This flag is available in KrakenD v2+)
but this is also waiting for the response , not sure I understand this correctly and still this plugin is applicable for latest version.
3. Auto Sync Agents in Enterprise edition , but not sure it can call an API asynchronously with Pub/Sub model.Can any one advise , what's the best way to deal this use case ? Thanks much in advance !

Daniel Ortiz

unread,
Jul 9, 2025, 7:40:05 AMJul 9
to KrakenD Community, erv...@gmail.com
Hi!

The shadow proxy can assist you with this, as it launches the requests and ignores the responses.

Reply all
Reply to author
Forward
0 new messages