liveBook · Manning

Azure Functions

As explained in Enterprise RAG

Azure Functions is Microsoft's serverless compute service for running event-triggered application code.

Azure Functions provides a small serverless endpoint for event-triggered application work. A feedback workflow uses an HTTP-triggered function to accept ratings and comments, then write them to Cosmos DB. section 6.3 section 6.7

Place the function between the browser and the database rather than exposing database credentials in client-side JavaScript. Server-side environment variables, Key Vault, and role-based access control protect secrets, while a separate function isolates quick, bursty writes from long-lived chat streaming. section 6.5

A practical Azure Functions workflow includes:

  • Create a Cosmos DB feedback container and configure its endpoint, key, database name, and container name through environment variables. section 6.3
  • Implement a Python HTTP-triggered function that reads question, answer, email, rating, and reason values before storing an item. section 6.7
  • Install dependencies and Azure Functions Core Tools, start the local runtime, and exercise the endpoint with a REST client. section 6.7
  • Review stored feedback in Cosmos DB and query recent negative ratings for operational follow-up. section 6.11

Feedback capture endpoint

A browser submits a thumbs-down rating and explanation to an HTTP-triggered function. The function stores the JSON record in Cosmos DB, where recent complaints can be inspected or monitored for spikes. section 6.11

Figure 6.4 The relationship between your web browser and CosmosDB. We have a function app in the middle for database security.

Use the architecture figure to trace the browser-to-function-to-Cosmos DB boundary and understand where database security is enforced. section 6.5

How Enterprise RAG covers it

How deep it goes
Builds a Python HTTP function, configures dependencies and secrets, tests locally, and stops short of detailed scaling implementation.
Examples
Uses thumbs-up and thumbs-down feedback, JSON request payloads, local REST calls, and queries for recent negative ratings.
What it assumes
Assumes basic Python, HTTP, environment-variable, Cosmos DB, and command-line setup knowledge while providing installation instructions for required tooling.
What you can do after
Build it from scratch as a locally tested feedback API that securely stores application-generated records in Cosmos DB.
How it connects
Connects HTTP triggers with Cosmos DB, environment variables, Key Vault, role-based access control, and Azure Monitor.

Also explained in

Compare how 2 books explain Azure Functions →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Enterprise RAG. The section links point to the parts of the book it draws on.