{"id":6622,"date":"2023-09-05T07:00:59","date_gmt":"2023-09-05T14:00:59","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=6622"},"modified":"2025-01-31T09:34:50","modified_gmt":"2025-01-31T17:34:50","slug":"4-design-patterns-to-deal-with-large-item-sizes","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/4-design-patterns-to-deal-with-large-item-sizes\/","title":{"rendered":"4 Design Patterns to Deal with Large Item Sizes in Azure Cosmos DB for NoSQL"},"content":{"rendered":"<h2><b><span data-contrast=\"auto\">Introduction<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">A recommended best practice in Azure Cosmos DB for NoSQL is to avoid overly large item sizes. An Azure Cosmos DB item can represent either a document in a container, a row in a table, or a node or edge in a graph, depending on which API you use. Though the maximum size of an item allowed in Azure Cosmos DB for NoSQL is <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/concepts-limits#per-item-limits\">2 MB<\/a>, it is strongly recommended to restrict item sizes to 1 &#8211; 5 KB. This blog post covers multiple approaches that you can use to model large objects within your Azure Cosmos DB-backed application. <\/span><span data-ccp-props=\"{&quot;335551550&quot;:6,&quot;335551620&quot;:6}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This post draws from our experiences of collaborating with different Software Engineering and Line-Of-Business (LOB) Application teams at Walmart.<\/span><\/p>\n<h2><b><span data-contrast=\"auto\">Why should I avoid large items?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Serialization is the process by virtue of which Azure Cosmos DB SDKs convert a Java POJO or .NET object into JSON. The SDKs require more time and high CPU utilization on the client-side to serialize large item sizes (e.g., 500 KB, 700 KB) for sending the JSON across the wire during a CRUD call. In high volume scenarios, this could result in users experiencing higher than normal write latency with <\/span><span data-contrast=\"none\">a high percentage of create item requests <a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/java-sdk-v4-diagnostics\/#scenario-2-high-latency-writes-with-high-cpu-load\">getting HTTP Status code 408 (time out)<\/a> eventually<\/span><span data-contrast=\"auto\">. Your success with Azure Cosmos DB depends on how well you define and model for access patterns during data modeling.<\/span>\n<span data-ccp-props=\"{&quot;335551550&quot;:6,&quot;335551620&quot;:6}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Short summary of the design patterns covered in this blog post.<\/span><\/b><\/p>\n<table style=\"width: 100%; height: 413px;\" data-tablestyle=\"MsoTableGrid\" data-tablelook=\"1184\" aria-rowcount=\"5\">\n<tbody>\n<tr style=\"height: 44px;\" aria-rowindex=\"1\">\n<td style=\"width: 2.56176%; text-align: center; height: 44px;\" data-celllook=\"0\"><b><span data-contrast=\"auto\">#<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 41.4456%; height: 44px;\" data-celllook=\"0\">\n<p style=\"text-align: center;\"><b><span data-contrast=\"auto\">Design Pattern<\/span><\/b><\/p>\n<\/td>\n<td style=\"width: 55.8097%; height: 44px;\" data-celllook=\"0\">\n<p style=\"text-align: center;\"><b><span data-contrast=\"auto\">User-end experience<\/span><\/b><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 86px;\" aria-rowindex=\"2\">\n<td style=\"width: 2.56176%; text-align: center; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">1<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 41.4456%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">Default behavior<\/span><\/td>\n<td style=\"width: 55.8097%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">You receive \u201cError 413: Entity too large\u201d.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 86px;\" aria-rowindex=\"3\">\n<td style=\"width: 2.56176%; text-align: center; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">2<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 41.4456%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">CQRS: Store large item in Azure Blob Storage with a pointer in Azure Cosmos DB<\/span><\/td>\n<td style=\"width: 55.8097%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">You should use this for applications needing high durability and low-cost.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 86px;\" aria-rowindex=\"4\">\n<td style=\"width: 2.56176%; text-align: center; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">3<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 41.4456%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">Split large item<\/span><\/td>\n<td style=\"width: 55.8097%; height: 86px;\" data-celllook=\"0\"><span data-contrast=\"auto\">Requires re-modeling at container level.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 111px;\" aria-rowindex=\"5\">\n<td style=\"width: 2.56176%; text-align: center; height: 111px;\" data-celllook=\"0\"><span data-contrast=\"auto\">4<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/td>\n<td style=\"width: 41.4456%; height: 111px;\" data-celllook=\"0\"><span data-contrast=\"auto\">Compress large item<\/span><\/td>\n<td style=\"width: 55.8097%; height: 111px;\" data-celllook=\"0\"><span data-contrast=\"auto\">Only applicable for scenarios wherein additional compute time for uncompressing is OK.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span data-ccp-props=\"{&quot;335551550&quot;:6,&quot;335551620&quot;:6}\">\u00a0<\/span><\/p>\n<h2><b><span data-contrast=\"auto\">Design Patterns<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/h2>\n<h3><b><span data-contrast=\"auto\">Pattern #1: Default Behavior<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">The default behavior for Azure Cosmos DB for NoSQL is to reject items which are over the maximum permissible size limit. The limit is 2 MB. In such a situation, you are returned an error message indicating the item size is larger than the permissible limit. It is the responsibility of the developer to handle the exception, and implement the correct behavior, which could be based on one or more of the following design patterns mentioned below.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The error encountered is similar to:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<pre><span data-contrast=\"none\">2019-10-01T00:34:11.057681415Z {Error: Message: {\"Errors\":[\"Request size is too large\"]}<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span>\r\n\r\n<span data-contrast=\"none\">2019-10-01T00:34:14.057755320Z RequestStartTime: 2019-10-01T00:34:13.9695930Z, RequestEndTime: 2019-10-01T00:34:13.99955676Z, Number of regions attempted:1<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span>\r\n\r\n<span data-contrast=\"none\">2019-10-01T00:34:14.057768921Z ResponseTime: 2019-11-01T00:43:13.9995776Z, StoreResult: StorePhysicalAddress: rntbd:&lt;&lt;&gt;&gt;p\/, LSN: -1, GlobalCommittedLsn: -1, PartitionKeyRangeId: , IsValid: True, StatusCode: 413, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: , UsingLocalLSN: False, TransportException: null, ResourceType: Document, OperationType: Create<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/pre>\n<p>This error is flagged off with HTTP Status Code 413. This refers to the fact that the item size in the request exceeded the allowable item size for a request. I<span data-contrast=\"auto\"><span style=\"text-align: var(--bs-body-text-align);\">n<\/span>\u00a0such a scenario, it is recommended that you try and know the exact item size that you want to process. You can use the Azure Cosmos DB SDK to determine the size of the item size before sending it. Use <\/span><a href=\"https:\/\/www.newtonsoft.com\/json\/help\/html\/m_newtonsoft_json_jsonconvert_serializeobject.htm\"><span data-contrast=\"none\">JsonConvert.SerializeObject<\/span><\/a><span data-contrast=\"auto\"> which serializes the specified object to a JSON string. You can then find the size sent over the wire using Encoding.UTF8.GetBytes.<\/span><\/p>\n<pre><span data-contrast=\"none\">public static int GetTakeCount(IEnumerable&lt;object&gt; docs, int maxSizeKb = 500)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span>\r\n<span data-contrast=\"none\">{<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span>\r\n<span data-contrast=\"none\">    var takeCount = docs.Count();<\/span>\r\n<span data-contrast=\"none\">    while(takeCount &gt; 1)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span>\r\n<span data-contrast=\"none\">    {\r\n<\/span><span data-contrast=\"none\">         var bytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(docs.Take(takeCount)));\r\n<\/span><span data-contrast=\"none\">         if((bytes.Length \/ 1000) &lt;= maxSizeKb)\r\n<\/span>         {\r\n             \/\/ array is small\r\n             <span data-contrast=\"none\">break;\r\n<\/span><span data-contrast=\"none\">         }\r\n<\/span><span data-contrast=\"none\">         takeCount = Convert.ToInt32(Math.Ceiling((double)takeCount \/ 2));\r\n<\/span><span data-contrast=\"none\">    }\r\n<\/span><span data-contrast=\"none\">    return takeCount;<\/span> \r\n<span data-contrast=\"none\">}<\/span><\/pre>\n<h3><b><span data-contrast=\"auto\">Pattern #2: CQRS: Store large item in Azure Blob Storage with a pointer in Azure Cosmos DB<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">If you have a use-case scenario wherein you need to be able to store a large item (usually in the form of a Binary Large Object (or, Blob)), it is recommended that you store the item in Azure Blob storage. Azure Blob storage is purpose-built storage for providing high durability and low-cost. You can store the meta-data related to the large item along with reference URI links as item properties in Azure Cosmos DB. As a developer, you need to refactor your application code to read and write blobs from the Azure Blob storage container.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/architecture\/patterns\/cqrs\"><strong>Command and Query Responsibility Segregation (CQRS)<\/strong><\/a> pattern ensures that you separate write (or, update) and read operations for the Azure Cosmos DB data store using a queue for asynchronous processing. This will ensure high performance, scalability, and security of your user-end application.<\/span><\/p>\n<p><span data-contrast=\"auto\">Three practical design decisions for this pattern include:<\/span><\/p>\n<ol>\n<li data-leveltext=\"-\" data-font=\"Calibri Light\" data-listid=\"34\" data-list-defn-props=\"{&quot;335551671&quot;:2019,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri Light&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2019\" data-aria-level=\"1\"><span data-contrast=\"auto\"><span data-contrast=\"auto\"><span data-contrast=\"auto\">You need to ensure data object mapping does not get overly complicated. This will affect latency for writes and reads while writing and reading large items from the Azure Blob storage container respectively.<\/span><\/span><\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri Light\" data-listid=\"34\" data-list-defn-props=\"{&quot;335551671&quot;:2019,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri Light&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2019\" data-aria-level=\"1\"><span data-contrast=\"auto\"><span data-contrast=\"auto\"><span data-contrast=\"auto\">You need to handle data contention on the client-end wherein two or more write operations performed in parallel could be accessing (updating and subsequently reading) the same set of data. Azure Cosmos DB has support for multiple types of CRUD operation conflict resolution policies including Last Write Wins (LWW) and custom conflict resolution via a merge stored procedure. Read <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/conflict-resolution-policies\">here<\/a> for further information.<\/span><\/span><\/span><\/li>\n<li data-leveltext=\"-\" data-font=\"Calibri Light\" data-listid=\"34\" data-list-defn-props=\"{&quot;335551671&quot;:2019,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri Light&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2019\" data-aria-level=\"1\"><span data-contrast=\"auto\">You need to encapsulate any business logic-related customization in your application code. This should not be part of the Azure Cosmos DB data model.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><span data-contrast=\"auto\">This pattern is illustrated using the architecture below:<\/span><\/p>\n<style>\n  html[theme=\"dark\"] .postid-6622 .entry-content img {\n    background: #d0d0d0;\n  }\n  body.postid-6622 .featherlight .featherlight-content {\n    background: #d0d0d0;\n  }\n<\/style>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6637\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1.png\" alt=\"Command and Query Responsibility Segregation (CQRS) pattern\" width=\"1603\" height=\"704\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1.png 1603w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1-300x132.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1-1024x450.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1-768x337.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture1-1536x675.png 1536w\" sizes=\"(max-width: 1603px) 100vw, 1603px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW231717391 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW231717391 BCX8\">In a real-life<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> scenario, e.g., you are building a Content Indexing egress API with<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> high volume<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> and<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> sudden burst<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> generation of items<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\">, you could introduce <\/span><span class=\"NormalTextRun SCXW231717391 BCX8\">additional<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> layers for handling scalability into the solution architecture<\/span><span class=\"NormalTextRun SCXW231717391 BCX8\"> with distinct read and write models serving the data layer in Azure Cosmos DB for NoSQL.<\/span><\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6639\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2.png\" alt=\"Real-life scenario exhibiting distinct read and write models serving the data layer in Azure Cosmos DB.\" width=\"1603\" height=\"589\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2.png 1603w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2-300x110.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2-1024x376.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2-768x282.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture2-1536x564.png 1536w\" sizes=\"(max-width: 1603px) 100vw, 1603px\" \/><\/a><\/p>\n<h3><strong>Pattern #3: Split large item<\/strong><\/h3>\n<p>This involves splitting the large item into multiple smaller items based at an item attribute-level analysis. This involves adopting any one of the following strategies:<\/p>\n<h4><strong>Strategy #3a: Splitting attributes into required versus non-required based on a specific Query Pattern:<\/strong><\/h4>\n<p>This requires you to understand your key query pattern, and the necessary attributes in the items which are required to perform those operations. E.g., you are an Azure Cosmos DB developer building an application for a chain of online medical stores. You have architected an eCommerce application which uses Azure Cosmos DB for NoSQL as a data source. You have chosen to ingest all data related to a nutrition dataset in an Azure Cosmos DB container.<\/p>\n<p>The following is a sample of the document in the Azure Cosmos DB for NoSQL container.<\/p>\n<pre><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"id\":\u202f\"03226\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"description\":\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">Babyfood<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">,\u202fdessert,\u202ffruit\u202fpudding,\u202forange,\u202fstrained\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"tags\":\u202f[<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">babyfood<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"dessert\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"fruit\u202fpudding\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"orange\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"strained\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f],<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"version\":\u202f1,<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"foodGroup\":\u202f\"Baby\u202fFoods\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"nutrients\":\u202f[<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"id\":\u202f\"612\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"14:0\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">nutritionValue<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f0.088,<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"units\":\u202f\"g\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"id\":\u202f\"629\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"20:5\u202fn-3\u202f(EPA)\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">nutritionValue<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f0,<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"units\":\u202f\"g\"<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f],<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"servings\":\u202f[<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"amount\":\u202f1,<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"oz\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">weightInGrams<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f28.35<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"amount\":\u202f1,<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"jar\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">weightInGrams<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f113<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f],<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"_rid\":\u202f\"hxoIAP3QYIkDAAAAAAAAAA==\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"_self\":\u202f\"<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">dbs<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\/<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">hxoIAA<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">==\/<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">colls<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\/hxoIAP3QYIk=\/docs\/hxoIAP3QYIkDAAAAAAAAAA==\/\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"_<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">etag<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f\"\\\"04012883-0000-0700-0000-6177d8510000\\\"\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"_attachments\":\u202f\"attachments\/\",<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">\u202f\u202f\u202f\u202f\"_<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW154961390 BCX8\">ts<\/span><span class=\"NormalTextRun SCXW154961390 BCX8\">\":\u202f1687544113<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><span class=\"TextRun SCXW154961390 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW154961390 BCX8\">}<\/span><\/span><span class=\"LineBreakBlob BlobObject DragDrop SCXW154961390 BCX8\"><span class=\"SCXW154961390 BCX8\">\u00a0<\/span><br class=\"SCXW154961390 BCX8\" \/><\/span><\/pre>\n<p><span class=\"TextRun SCXW206266929 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW206266929 BCX8\">In the JSON above, foodGroup is the partition key for the <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">container<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">.<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> Your primary query pattern <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">is a <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">point-read based on id and partition key for the container. Assuming you have a large number of additional attributes (e.g., minimum 10 tags in 100,000 items, and minimum 4 tags in 100,000 items), which are not being utilized by your <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW206266929 BCX8\">top 25<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> queries, you could proceed to remove the tags from the items. <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">If an in-partition query currently costs 3.22 RUs, you <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">will <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">observe<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> a much small<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">er<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> item size <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">resulting<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> in 2.8 RUs, in our case. This<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">,<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> iterated over a million documents<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">,<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> result<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">s<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> in <\/span><span class=\"NormalTextRun SCXW206266929 BCX8\">substantial<\/span><span class=\"NormalTextRun SCXW206266929 BCX8\"> cost savings and optimized query performance as well.<\/span><\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Strategy #3b: Bucketing attributes into separate list items based on the partition key:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">This requires you to understand your key query pattern, and then separate the attributes to distinct items and bucket them based on the partition key. You can store the items in the same container and query them based on need which improves query performance and reduces I\/O costs considerably.<\/span> <span data-contrast=\"auto\">The following is a sample of an item in an Azure Cosmos DB for NoSQL container.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<pre><span data-contrast=\"auto\">{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"id\":\u202f\"03226\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"description\":\u202f\"Babyfood,\u202fdessert,\u202ffruit\u202fpudding,\u202forange,\u202fstrained\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"tags\":\u202f[<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"babyfood\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"dessert\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"fruit\u202fpudding\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"orange\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"strained\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f],<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"version\":\u202f1,<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"foodGroup\":\u202f\"Baby\u202fFoods\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"nutrients\":\u202f[<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"id\":\u202f\"612\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"14:0\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"nutritionValue\":\u202f0.088,<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"units\":\u202f\"g\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"id\":\u202f\"629\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"20:5\u202fn-3\u202f(EPA)\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"nutritionValue\":\u202f0,<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"units\":\u202f\"g\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f],<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"servings\":\u202f[<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"amount\":\u202f1,<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"oz\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"weightInGrams\":\u202f28.35<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"amount\":\u202f1,<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"description\":\u202f\"jar\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"weightInGrams\":\u202f113<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f],<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_rid\":\u202f\"hxoIAP3QYIkDAAAAAAAAAA==\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_self\":\u202f\"dbs\/hxoIAA==\/colls\/hxoIAP3QYIk=\/docs\/hxoIAP3QYIkDAAAAAAAAAA==\/\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_etag\":\u202f\"\\\"04012883-0000-0700-0000-6177d8510000\\\"\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_attachments\":\u202f\"attachments\/\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_ts\":\u202f1635244113<\/span>\u00a0\r\n<span data-contrast=\"auto\">}<\/span><\/pre>\n<p><span data-contrast=\"auto\">foodGroup is the partition key for the container. If for a given use case, your application requires a query per product level tags, you could separate the items and create a read model specifically targeting that query.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<pre><span data-contrast=\"auto\">SELECT * FROM c WHERE c.foodGroup = \u201cBaby Foods\u201d AND c.tags.name = \u201cbabyfood\u201d<\/span><span data-ccp-props=\"{}\">\u00a0<\/span>\r\n\r\n<span data-contrast=\"auto\">{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"id\":\u202f\"132541\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\"tags\":\u202f[<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"babyfood\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"dessert\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"fruit\u202fpudding\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"orange\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f},<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f{<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f\"name\":\u202f\"strained\"<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\u202f\u202f\u202f\u202f}<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f],<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"foodGroup\":\u202f\"Baby\u202fFoods\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_rid\":\u202f\"hxoIAP3QYIkDAAAAAAAAAA==\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_self\":\u202f\"dbs\/hxoIAA==\/colls\/hxoIAP3QYIk=\/docs\/hxoIAP3QYIkDAAAAAAAAAA==\/\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_etag\":\u202f\"\\\"04012883-0000-0700-0000-6177d8510000\\\"\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_attachments\":\u202f\"attachments\/\",<\/span>\u00a0\r\n<span data-contrast=\"auto\">\u202f\u202f\u202f\u202f\"_ts\":\u202f1635244113<\/span>\u00a0\r\n<span data-contrast=\"auto\">}<\/span> <span data-ccp-props=\"{}\">\u00a0<\/span><\/pre>\n<p><span data-contrast=\"auto\">You could take this analysis further by studying the most commonly recurring pattern of search queries for the Baby Foods tag value and group the most commonly used ones together and move the not so commonly used attributes to either a separate item container, or to cold storage (e.g., Azure Blob container).<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">Pattern #4: Compress large item<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">If Pattern #2 and #3 are not applicable, another strategy could be using a fast data compression and decompression library, e.g., <\/span><span data-contrast=\"none\">Snappy<\/span><span data-contrast=\"auto\">. <a href=\"https:\/\/google.github.io\/snappy\/\">Snappy<\/a> is a fast data compression and decompression library written in C++ by Google based on ideas from LZ77 and open-sourced in 2011. The pattern here utilizes an underlying CQRS pattern wherein the write function uses a Snappy function to compress the item. The library then stores the item in a distinct write-model in Azure Cosmos DB for NoSQL.<\/span><\/p>\n<p><span data-contrast=\"auto\">It is recommended that you test out different permutations and combinations for the level of compression which could be performed by a specific library against specific item sizes, and the time it takes for the compression and decompression to happen during reads. This analysis will determine whether this is a feasible pattern for your specific use-case and read\/write SLAs. If not, then either Pattern #2 or #3 should be the obvious choice instead of Pattern #4.<\/span><\/p>\n<p><span data-contrast=\"auto\">There will be a compute overhead for this pattern and it will not be beneficial for high volume, low burst scenarios requiring very low latency processing requirements.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The write function compresses the item and generates a compressed string. The read function uncompresses the item to the original verbose payload.\u00a0<\/span><span data-contrast=\"auto\">The pattern is as illustrated below:<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6642\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3.png\" alt=\"Compress large item using Compression algo in Azure Cosmos DB for NoSQL.\" width=\"1603\" height=\"906\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3.png 1603w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3-300x170.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3-1024x579.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3-768x434.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture3-1536x868.png 1536w\" sizes=\"(max-width: 1603px) 100vw, 1603px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW195550973 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW195550973 BCX8\">A practical implementation could be a hybrid pattern of #2 and #4, as illustrated below:<\/span><\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6643\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4.png\" alt=\"Another practical implementation could be a hybrid pattern of #2 and #4, as illustrated below:\" width=\"1603\" height=\"681\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4.png 1603w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4-300x127.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4-1024x435.png 1024w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4-768x326.png 768w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2023\/08\/Picture4-1536x653.png 1536w\" sizes=\"(max-width: 1603px) 100vw, 1603px\" \/><\/a><\/p>\n<h2><b><span data-contrast=\"auto\">Conclusion<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Your specific use case will determine which is the most effective pattern to leverage for handling large item sizes in Azure Cosmos DB for NoSQL. Five key parameters which you should test include: volume of requests, nature of requests (real-time versus batch), Request Unit (RU) costs per operation, latency (low-latency scenarios) and finally, compute and application-end complexities and overhead(s) for a specific operation. It is advisable for you to test out the scenarios in this blog post and adopt the one which provides you with the best price to performance ratio in the long run. <\/span><\/p>\n<p><span data-contrast=\"auto\">Have you faced any challenges in handling large item sizes in Azure Cosmos DB for NoSQL in any of your own projects? How did you overcome them? Let us know your thoughts in the comments section below.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">Where to learn more.<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Explore the following links for further information:<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"18\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure Cosmos DB <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/nosql\/modeling-data\"><span data-contrast=\"none\">Data Modeling<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"18\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure Cosmos DB <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/nosql\/model-partition-example\"><span data-contrast=\"none\">Model and Partition Data using a real-world example<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"18\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure Cosmos DB <\/span><a href=\"https:\/\/www.youtube.com\/c\/AzureCosmosDB\/featured\"><span data-contrast=\"none\">Live TV &#8211; YouTube Channel<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"18\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure Cosmos DB Certification: <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/users\/sandramarin\/collections\/3mgi2xrog25ke?WT.mc_id=Azure_blog-wwl\"><span data-contrast=\"none\">DP-420 Exam Official Microsoft Learn Collection<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"18\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure Cosmos DB <\/span><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/\"><span data-contrast=\"none\">Blog<\/span><\/a><span data-contrast=\"auto\">. Subscribe for latest news, updates &amp; technical insights.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction\u00a0 A recommended best practice in Azure Cosmos DB for NoSQL is to avoid overly large item sizes. An Azure Cosmos DB item can represent either a document in a container, a row in a table, or a node or edge in a graph, depending on which API you use. Though the maximum size of [&hellip;]<\/p>\n","protected":false},"author":93861,"featured_media":6643,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,1611,1828,19],"tags":[1882,1883,1843],"class_list":["post-6622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-sql-api","category-data-architecture","category-data-modeling","category-tips-and-tricks","tag-design-patterns","tag-solution-architecture","tag-troubleshooting"],"acf":[],"blog_post_summary":"<p>Introduction\u00a0 A recommended best practice in Azure Cosmos DB for NoSQL is to avoid overly large item sizes. An Azure Cosmos DB item can represent either a document in a container, a row in a table, or a node or edge in a graph, depending on which API you use. Though the maximum size of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/6622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/93861"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=6622"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/6622\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/6643"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=6622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=6622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=6622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}