Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Default timeout value on AEM Dispatcher.

Avatar

Employee

Hi All,

 

In AEM Dispatcher, there is a timeout value under the renders property in the Dispatcher configuration which I assume determines the maximum time the dispatcher will wait for a response from the AEM publish instance when rendering dynamic content. Currently, the timeout is set to default value 10000 ms so if I change this configuration to let's say 50000 ms, it would increase timeout in Dispatcher? I'm still newbie to AEM andI would like to confirm if my understanding is correct.

 
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @eobaseki 

 

  • The timeout value specifies the duration for which the Dispatcher will wait for a response from the AEM publish instance. If the response is not received within the specified timeout duration, the Dispatcher considers the request as timed out.

 

  • The purpose of this timeout value is to prevent the Dispatcher from waiting indefinitely for a response from the publish instance. By setting a timeout, you can control the maximum time the Dispatcher will wait, ensuring that requests are not held up indefinitely and can fail gracefully if the publish instance does not respond within the specified time.

 

You can read more about it here https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... 

 

 

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

Hello @eobaseki 

 

  • The timeout value specifies the duration for which the Dispatcher will wait for a response from the AEM publish instance. If the response is not received within the specified timeout duration, the Dispatcher considers the request as timed out.

 

  • The purpose of this timeout value is to prevent the Dispatcher from waiting indefinitely for a response from the publish instance. By setting a timeout, you can control the maximum time the Dispatcher will wait, ensuring that requests are not held up indefinitely and can fail gracefully if the publish instance does not respond within the specified time.

 

You can read more about it here https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... 

 

 

Avatar

Employee

Hi Tanika02,

 

Thank you for your prompt response. This article is really helpful and make sure I will read through them

Avatar

Employee

Hello @Tanika02 and @MayurSatav ,

 

I read the deck attached (https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...), and I have another doubt.

 

What is the difference between /timeout and /receiveTimeout ? Because the definition of these two just looks quite similar to me. Could you please provide some examples to show how should I choose from these two depending on different scenarios? Thank you.

Avatar

Community Advisor

Hello @Yijun250211319mpv - 

Let me try explaining this with the help of an example : 

 

Timeout

  • Let's say you have set the timeout value to 10 seconds in the Dispatcher configuration. When a client (let's say a browser) sends a request to the Dispatcher, the Dispatcher forwards the request to one of the AEM instances. The Dispatcher will wait for a response from that specific AEM instance for a maximum of 10 seconds. If the AEM instance does not respond within this time, the Dispatcher will consider the request as timed out and may return an error to the client.

Receive Timeout

  • Now, let's assume you have set the receiveTimeout value to 5 seconds. When the Dispatcher sends a request to one of the AEM instances, it starts a timer. If the AEM instance does not respond within 5 seconds, the Dispatcher assumes that the AEM instance is unresponsive and considers it as a failed attempt. In such a case, the Dispatcher may try to send the request to another AEM instance behind the load balancer (You can do so via retryDelay & numberOfRetries) or return an error to the client, depending on the specific Dispatcher configuration.

 

Summary

 

By setting these timeout values appropriately, you can control the maximum waiting time for a response from the given AEM instance (timeout) and the maximum waiting time for any backend AEM instance in a load-balanced environment (receiveTimeout) within the AEM Dispatcher configuration.

 

Regards,

Tanika

Avatar

Level 1

Hi @Tanika02 ,

Thank you so much for giving such a clear explanation. Now I completely understand the specification. Really appreciate your help! 

Avatar

Community Advisor

If you increase the timeout configuration to 50000 ms (50 seconds), it will indeed increase the timeout duration. This can be useful in scenarios where requests to the backend server may take longer to process, such as when handling complex queries or performing resource-intensive operations.

Avatar

Employee

Hi MayurSatav,

 

Thank you for your prompt response to my question and yes that makes a lot of sense

Thanks again!