A Mule application deployed to multiple CloudHub 2.0 replicas needs to temporarily persist large files over 10MB between flow executions, and routinely needs to query whether the file data exists on separate executions.
How can this be achieved?
A.
Store the contents of the file on separate storage, and store the key and location of the file using Object Store v2
B.
Use an in-memory Object Store
C.
Store the key and full contents of the file in an Object Store
D.
Use the file connector to store and read the file, caching the filename and location between requests
Object Store v2 is suitable for distributed key/value state that must be available across CloudHub executions and replicas, but it should not be used to hold the complete contents of files larger than its per-value limit. MuleSoft documents that an Object Store v2 value is limited to 10 MB, while the overall store does not have a fixed aggregate size limit.
The appropriate architecture is therefore to persist the binary file itself in storage designed for large objects—for example, a durable external object/blob storage service—and store only lightweight metadata in Object Store v2. That metadata can include the object's storage key, URI/location, status, or other lookup information. Subsequent flow executions can query Object Store v2 to determine whether the object exists and then retrieve the actual file from the external storage system.
An in-memory Object Store is inappropriate because application replicas do not provide a durable shared in-memory persistence model for this requirement. Storing the entire file directly in Object Store violates the 10 MB value constraint. Local file-based storage is also unsuitable as a cross-replica CloudHub persistence mechanism.
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit