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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:47:37+00:00 2026-05-30T16:47:37+00:00

I know the term Load Balancing can be very broad, but the subject I’m

  • 0

I know the term “Load Balancing” can be very broad, but the subject I’m trying to explain is more specific, and I don’t know the proper terminology. What I’m building is a set of Server/Client applications. The server needs to be able to handle a massive amount of data transfer, as well as client connections, so I started looking into multi-threading.

There’s essentially 3 ways I can see implementing any sort of threading for the server…

  • One thread handling all requests (defeats the purpose of a thread if 500 clients are logged in)
  • One thread per user (which is risky to create 1 thread for each of the 500 clients)
  • Pool of threads which divide the work evenly for any number of clients (What I’m seeking)

The third one is what I’d like to know. This consists of a setup like this:

  • Maximum 250 threads running at once
  • 500 clients will not create 500 threads, but share the 250
  • A Queue of requests will be pending to be passed into a thread
  • A thread is not tied down to a client, and vice-versa
  • Server decides which thread to send a request to based on activity (load balance)

I’m currently not seeking any code quite yet, but information on how a setup like this works, and preferably a tutorial to accomplish this in Delphi (XE2). Even a proper word or name to put on this subject would be sufficient so I can do the searching myself.

EDIT

I found it necessary to explain a little about what this will be used for. I will be streaming both commands and images, there will be a double-socket setup where there’s one “Main Command Socket” and another “Add-on Image Streaming Socket”. So really one connection is 2 socket connections.

Each connection to the server’s main socket creates (or re-uses) an object representing all the data needed for that connection, including threads, images, settings, etc. For every connection to the main socket, a streaming socket is also connected. It’s not always streaming images, but the command socket is always ready.

The point is that I already have a threading mechanism in my current setup (1 thread per session object) and I’d like to shift that over to a pool-like multithreading environment. The two connections together require a higher-level control over these threads, and I can’t rely on something like Indy to keep these synchronized, I’d rather know how things are working than to learn to trust something else to do the work for me.

  • 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-30T16:47:39+00:00Added an answer on May 30, 2026 at 4:47 pm

    IOCP server. It’s the only high-performance solution. It’s essentially asynchronous in user mode, (‘overlapped I/O in M$-speak), a pool of threads issue WSARecv, WSASend, AcceptEx calls and then all wait on an IOCP queue for completion records. When something useful happens, a kernel threadpool performs the actual I/O and then queues up the completion records.

    You need at least a buffer class and socket class, (and probably others for high-performance – objectPool and pooledObject classes so you can make socket and buffer pools).

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

Sidebar

Related Questions

I don't know if the term mass assignment is Rails-specific but I get the
Well, I don't know if strong naming is the right term, but what I
Forgive me, but I don't know the technical term to know what to search
I don't know whether the term Lazy Binary Search is valid, but I was
Know this might be rather basic, but I been trying to figure out how
I do not know the right term for this but say I want to
I'm not a developer so I don't know the right term for this. I
I don't know the exact term for what I am looking for. I am
Is there a way to recursively redefine (don't know the technical term) prolog predicates?
I know what serialization is , but to me, this is one term that

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.