Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4615872
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:54:07+00:00 2026-05-22T01:54:07+00:00

Question: I’ve been told that best practice states that long running http web requests

  • 0

Question:

I’ve been told that best practice states that long running http web requests should be turned into shorter asynchronous requests with a mechanism for polling for completion.

Why?

Important Distinction:

I’m working on a web service API. It’s not meant to be called by browsers (which would hang on the load) but by rich clients (which call remote services asynchronously anyways) and scripts (which can do the same asynchronous trick)

Motivation:

I’d like to know because I’m trying to make decisions as to when a request should be made asynchronous, what is the cutoff point? I’m working on a web based API that has requests which take anywhere from 0.001 seconds to 400 seconds (and everywhere in between) depending on the request (not the parameters but which actual method they’re calling).

I could make everything asynchronous (except for the poll for command completion) but that complicates the work done by API clients (i.e. getting results from requests, polling for completion, etc.)

As far as I know I could also make everything synchronous since the same amount of work is getting done either way so it seems the load will be similar.

Furthermore, all the web services I’ve used seem to follow a hybrid model so they must be making the decision somehow.

The only way I could really answer this question is to know why that best practice exists.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:54:08+00:00Added an answer on May 22, 2026 at 1:54 am

    Asynchronous APIs do not block. Every synchronous call waits and blocks for your results to come back. This is just a sleeping thread and wasted computation.

    If you need something to happen, send of an asynchronous request and do further computation when the request returns. This means your thread sits idle and can pick up other work.

    Asynchronous requests is the way to scale to thousands of concurrent users.

    but that complicates the work done by API clients

    This is just a matter of API design. Generally you can call your web API with a callback to handle this. No polling is required.

    WebService.Call("someMethod" (data) -> {
       // do something when data returns.
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question Can I build a image database/library that has an e-commerce style checkout system
Question Is there a way to have a method that will always run anytime
Question: Should I write my application to directly access a database Image Repository or
Question: Today I worked with MS Visual Sourcesafe, that is to say Microsoft's Sourcecode
Question: I have a console program that shouldn't be seen. (It resets IIS and
Question: Can anyone please provide a full code example that shows how one does
Question: I just stumbled upon: http://icculus.org/~chunky/writing/inetd I realized it removes the http://www in front
Question Is there a usable facebook entry point to the Data Storage API that
Question as stated in the title.
Question is pretty self explanitory. I want to do a simple find and replace,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.