Hey @Faheem Haider — sounds like you’re looking to migrate a long-running domain crawl/scraping job to Azure, where the runtime can vary a lot based on the target site size/load, and you’re specifically worried about serverless execution/timeouts.
Based on the provided docs, here’s the most practical guidance we can give for architecture direction and “how to avoid pain” (even though the docs you provided don’t spell out exact timeout values).
Architecture recommendation (high level)
1) Prefer breaking the crawl into decoupled “work items”
The provided Azure hosting guidance for web apps notes that individual logical processes that can be decoupled from the rest of the application may be deployed independently to Azure Functions. In your case, that typically means splitting “crawl the whole domain” into smaller units (for example: discover links, then process pages in batches).
Why this helps: it keeps each function invocation more bounded and lets the platform scale out based on the queue of work rather than keeping one single long-running execution alive.
2) Use a job/work queue pattern to orchestrate crawling
From the provided Azure Functions documentation guidance on common scenarios and bindings, a typical pattern for long-running background work is:
- trigger work on a schedule or from an event
- enqueue units of work
- have Functions process those units independently
The Functions doc explicitly calls out run scheduled tasks via a TimerTrigger as a common scenario, and the hosting guidance mentions Azure offers queue/messaging options for transient orchestration/event-based data (it references Service Bus or Storage Queues, with Service Bus recommended for non-trivial messaging).
So, a cost- and scaling-friendly direction is:
- TimerTrigger (or some starter trigger) to kick off a “crawl run”
- Queue/Service Bus to store and distribute page-processing tasks
- Azure Functions workers to process tasks in parallel
3) Choose a Functions hosting plan based on “you need to manage execution behavior”
The Functions architecture best practices doc clarifies that Functions are serverless and run on App Service plans, with multiple hosting plans:
- Consumption plan: fully managed; doesn’t let you access the underlying App Service instance
- Dedicated / Premium plans: provide ability to configure/manage the App Service instance
If your concern is that a single attempt could run “too long” (depending on your target domain size), then the key is still to partition the work (step 1) so each execution stays within reasonable bounds. If, however, you truly need longer runtime per worker, then the doc suggests moving from Consumption to Dedicated/Premium gives more operational control.
4) Data/storage: store results efficiently for queryability and scale
Your scraper will likely generate lots of structured-ish results (e.g., URL + keyword matches + metadata). The provided documentation suggests:
- Transactional relational data → Azure SQL Database
- High-performance read-mostly → Redis backed by Azure SQL
- Unstructured JSON with strong querying at scale → Azure Cosmos DB (recommended for large numbers of JSON documents that must be queried)
A common approach is:
- write crawl findings to Cosmos DB (if you need flexible querying across JSON-y documents)
- or Azure SQL if your schema is relational and stable
How this addresses your timeout concern (practically)
Even though the docs you provided don’t give explicit “timeout limits,” the general mitigation supported by the docs is: don’t rely on one continuous long execution. Instead:
- use queue-based decomposition (Functions for decoupled logical processes)
- use scheduled/event-driven triggers (Functions scenarios)
- scale by processing multiple smaller tasks rather than one huge crawl
This keeps the system resilient under varying domain sizes and load, and it aligns with how Functions are designed to scale “based on demand” while charging for consumed operation time.
Hello @Faheem Haider If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.