Loading

HTTP Improvements : HTTP streaming behaviour for LLM scenarios

Publiceringsdatum: Oct 6, 2026
Beskrivning
The user reported that SSE streaming through MuleSoft was not working as expected for an Azure OpenAI integration. The main impact was high time to first byte through MuleSoft compared with direct Azure calls, making the team consider bypassing the MuleSoft layer.
Lösning

For applications deployed on CloudHub environments, use the following recommendations to help ensure efficient HTTP response streaming and minimize response latency.

1. Enable the recommended Mule runtime properties

Configure the following Mule runtime properties for applications that use response streaming:

mule.http.client.responseStreaming.nonBlockingWrite=true
mule.repeatableStreaming.bytes.eagerRead=true
mule.repeatableStreaming.useFairLocks=true

These properties are recommended to improve streaming behavior and reduce potential contention while processing HTTP responses.

2. Add a short wait before asynchronous processing, if applicable

If the application invokes a sub-flow or asynchronous processing block after receiving the HTTP response, consider introducing a small wait before that processing begins. This allows the HTTP response to consume the stream before other processing attempts to access the same resources.

3. Review the custom policy configuration

Do not apply the noname-security-mule4 custom policy to the affected API instances.

During troubleshooting, this custom policy was observed to acquire the lock before the HTTP response processing, which could contribute to increased Time to First Byte (TTFB).

4. Additional configuration for CloudHub 1.0

For applications deployed on CloudHub 1.0, configure the following HTTP Listener response header for all applicable responses:

X-Accel-Buffering: no

This configuration helps prevent downstream response buffering at the Dedicated Load Balancer (DLB) layer and supports the expected streaming behavior.

Knowledge-artikelnummer

005461208

 
Laddar
Salesforce Help | Article