High latencies in HTTP responses may occur in Mule applications during periods of high traffic when HTTP request cookies are enabled. This behavior can lead to significant delays in API calls, degraded application performance, and increased CPU utilization.
The "Enable Cookies" checkbox is located under the HTTP Request Configuration > Settings tab. When enabled, cookies received in HTTP responses are stored and sent in subsequent HTTP requests.
Refer to the HTTP Request Configuration documentation to know more about this parameter.
When an http:request-config element has cookies enabled, a single CookieManager is created for each instance of the request-config. If multiple http:request elements in a Mule application reference the same configuration, they all share the same CookieManager instance.
Mule uses the default Java CookieManager, which relies on a java.net.InMemoryCookieStore as its CookieStore. This implementation may result in thread lock when the same CookieStore is reused multiple times, causing high latencies in the application.
To mitigate this issue, consider the following:
http:request element uses a distinct http:request-config to avoid sharing the same CookieManager instance. This can also be achieved by implementing Dynamic configuration as explained in the following article: Cookie manager is shared among all the http requests in a mule application if they have same http configuration.The "Enable Cookies" option is enabled by default in the HTTP Request configuration, which may not be useful in most cases. If keeping this option disabled by default seems more appropriate, please consider upvoting the related Idea to request an update to this feature.
Update the Http Request Connector to turn off "enableCookies" as default
005132594

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.