Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Foundry Agent Webapps: Cosmos or Azure SQL for Backend State, and When?

I used AI tools to help draft and edit this post. I checked the facts and the wording, and the original lives at geekindata.com . The diagrams are on that page. Two store planes; one product API Key takeaways Split app-owned backend state from Foundry platform stores before you argue Cosmos versus Azure SQL. Sample RAG and chat diagrams often default history to Cosmos; treat that as tutorial…

Foundry agent web applications require careful consideration when deciding between Cosmos DB and Azure SQL for managing backend state. To avoid confusion, it is essential to split app-owned backend state from the Foundry platform stores before arguing about Cosmos versus Azure SQL. This separation allows for a clearer understanding of which engine best suits the specific needs of the app-owned collections.

When choosing between Cosmos and Azure SQL, consider the nature of the payload and the required relational operations. Cosmos DB is preferred when dealing with flexible document bags and scenarios where little relational joining is necessary. On the other hand, Azure SQL with Entity Framework Core is recommended when app-owned records must join cleanly and support relational operations, such as constraints and migrations.

One key aspect to keep in mind is that the API routes and JSON shapes for every app-owned collection must remain frozen. This ensures that the shell and callers do not need to relearn the contract during a migration. Once the migration is complete, the Cosmos app-data path can be deleted.

The decision to migrate from Cosmos to Azure SQL should be based on the specific requirements of the product. If joins, constraints, and migrations as code are crucial, Azure SQL is the better choice. It provides a stable HTTP API and supports queries that look like SQL, making it easier for support and audit teams to work with the data.

It is essential to understand that the decision about which engine backs the app-owned plane behind one product API is not a universal mandate. The shell API should remain stable, while the store engine can change. This means that sample defaults, such as the default use of Cosmos in Microsoft RAG chatbot samples, should be treated as context rather than a definitive rule. The real decision lies in which engine best supports the app-owned collections and meets the specific requirements of the product.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Convert Audible AAX Files to MP3 with a Local Shell Workflow

If you have an Audible audiobook in AAX format, the hard part is often not the final MP3 conversion. It is coordinating the activation step, the converter, browser automation, and the command-line…

  • Audible audiobooks converted to MP3 using Bash wrapper
  • Script requires Audible login, activation code, and AAX file
  • Process follows local workflow, no DRM bypass

Where your AWS data transfer costs come from

You pay AWS data transfer costs when data goes out to the internet, to another Region or to another Availability Zone, a separate group of data centres within a Region.

  • AWS charges for data transfer after 100 GB/month, at USD 0.09/GB to internet from Frankfurt
  • Data fetched by CloudFront or within a Region without internet transfer is free
  • CloudFront Pro plan costs USD 15/month for 50 TB transfer and 10 million requests

More from Sunday, 29 November 2026 →