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 610861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:43:16+00:00 2026-05-13T17:43:16+00:00

I’m tasked to create a web application. I’m currently using c# & asp.net (mvc

  • 0

I’m tasked to create a web application. I’m currently using c# & asp.net (mvc – but i doubt its relevant to the question) – am a rookie developer and somewhat new to .net.

Part of the logic in the application im building is to make requests to an external smsgateway by means of hitting a particular url with a request – either as part of a user-initiated action in the webapp (could be a couple of messages send) or as part of a scheduledtask run daily (could and will be several thousand message send).

In relation to a daily task, i am afraid that looping – say – 10.000 times in one thread (especially if im also to take action depending on the response of the request – like write to a db) is not the best strategy and that i could gain some performance/timesavings from some parallelization.

Ultimately i’m more afraid that thousands of users at the same time (very likely) will perform the action that triggers a request. With a naive implementation that spawns some kind of background thread (whatever its called) for each request i fear a scenario with hundreds/thousands of requests at once.

So if my assumptions are correct – how do i deal with this? do i have to manually spawn some appropriate number of new Thread()s and coordinate their work from a producer/consumer-like queue or is there some easy way?

Cheers

  • 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-13T17:43:16+00:00Added an answer on May 13, 2026 at 5:43 pm

    If you have to make 10,000 requests to a service then it means that the service’s API is anemic – probably CRUD-based, designed as a thin wrapper over a database instead of an actual service.

    A single “request” to a well-designed service should convey all of the information required to perform a single “unit of work” – in other words, those 10,000 requests could very likely be consolidated into one request, or at least a small handful of requests. This is especially important if requests are going to a remote server or may take a long time to complete (and 2-3 seconds is an extremely long time in computing).

    If you do not have control over the service, if you do not have the ability to change the specification or the API – then I think you’re going to find this very difficult. A single machine simply can’t handle 10,000 outgoing connections at once; it will struggle with even a few hundred. You can try to parallelize this, but even if you achieve a tenfold increase in throughput, it’s still going to take half an hour to complete, which is the kind of task you probably don’t want running on a public-facing web site (but then, maybe you do, I don’t know the specifics).

    Perhaps you could be more specific about the environment, the architecture, and what it is you’re trying to do?


    In response to your update (possibly having thousands of users all performing an action at the same time that requires you to send one or two SMS messages for each):

    This sounds like exactly the kind of scenario where you should be using Message Queuing. It’s actually not too difficult to set up a solution using WCF. Some of the main reasons why one uses a message queue are:

    • There are a large number of messages to send;
    • The sending application cannot afford to send them synchronously or wait for any kind of response;
    • The messages must eventually be delivered.

    And your requirements fit this like a glove. Since you’re already on the Microsoft stack, I’d definitely recommend an asynchronous WCF service backed by MSMQ.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 383k
  • Answers 383k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this (untested code): function tree_set($index) { //global $menu; Remove… May 14, 2026 at 10:53 pm
  • Editorial Team
    Editorial Team added an answer Yes, it can be done much shorter: void insert(LISTNODEPTR *list,… May 14, 2026 at 10:53 pm
  • Editorial Team
    Editorial Team added an answer Robert Penner wrote an AS3 Signals library, to replace flash… May 14, 2026 at 10:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.