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

  • SEARCH
  • Home
  • 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 7683339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:46:14+00:00 2026-05-31T18:46:14+00:00

Users on a website I’m building can request the availability of user names on

  • 0

Users on a website I’m building can request the availability of user names on various social networks by typing in a box and pressing return (see this website for an example). When the user submits a name for checking, I have to request availabilities from many different third-party services simultaneously. Each availability check requires a HTTP request. That means that one request from the user can trigger many HTTP requests on the backend.

Now I would like to get the results back to the user as fast as possible. Thus, I want to perform each of these backend availability checks separately and return the results as fast as I get them from the third-party. I would also like to use background worker processes to keep the load of making all these HTTP requests off my server.

Is this a viable usage of background workers or should they be only used for cases where the user is not waiting for results immediately (such as sending emails)?

Is this the best way to architect this application?

  • 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-31T18:46:14+00:00Added an answer on May 31, 2026 at 6:46 pm

    To me this looks like a perfect use case for combination of WebSockets and a reactor framework like EventMachine or node.js.

    Why WebSockets?

    For the request part, it does not matter that much. However the various external services will respond with various latencies, which means that in order to present the user with results as soon as possible you would probably have to launch a long-polling request for every one of those services (which typically would block the processes that handle those requests), or use a sequence of long-polling requests to get the responses as they come in. Every HTTP request has some amount of overhead required to establish the connection and you wold be transmitting a lot more data in HTTP headers than in the response itself.

    On the other hand, WebSocket connection is established once, and from then on it acts as a sort of a bidirectional pipe that can be used to transmit messages. Those messages could be the responses of various services that will be streamed to the client as soon as they arrive. This saves you a lot of overhead and gets the responses to the user as fast as possible.

    Why a reactor framework?

    If you use a background job to handle the responses, chances are, that you will have less worker processes than the number of requests to be made. This means that some of the requests will have to wait until the workers are ready, so the user will get the response later than he could get it if all the requests were done in parallel. Asynchronous I/O makes it possible to issue all those requests in parallel and return the results to the user as they come in.

    If you used a background job queue, it would also require that you save the results in some sort of data store, so that your web server can poll it to know when a particular request has finished. That server-side polling also increases the latency with wich user receives the data.

    Summing up: using a reactor framework + WebSockets will not only make the user experience better, it will also be simpler to implement. Check out the socket.io library for node.js: it should make it possible to implement your use case in a dozen of lines of code or so.

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

Sidebar

Related Questions

On my website users can keyword search and find desired results. (Just a simple
I have website where users can login with their Facebook account. I am using
i'm making a website where users can input some BBcodes and my owan BBcode
Iam desghning glitter text generating website ..where users can select glitters[images] to put it
I have a website where users can send their RICH text description. I'm using
I have a website where users can create new topics. Each topic has a
I'm building something that is going to inject HTML into a users website via
The users of the website I'm building should be able to publish a title,
I run a website where users can post items (e.g. pictures). The items are
I have a website where users can create albums and then add images to

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.