Results 1 to 6 of 6

Thread: Redirect a connection

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2007
    Location
    Kurdistan, Slemani
    Posts
    43

    Redirect a connection

    Main Server; Sub Server 1; Sub Server 2.

    Client(s) connects to the Main Server, the Main Server checks wich one of the Sub Servers that got less clients, and then sends the client(s) to that Sub Server.

    With other words, Redirecting the clients. Without them knowing it.

    Is this possible? I know it is if Im going to create a client aswell (make the client redirect the connection), but the client already exist for another protocol.

    Winsock - VB6.

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Redirect a connection

    A suggestion, maybe allow the users to connect to any server. And if the server has no more allowed connection then it will go to the next one. Basically check if the server is full not for the specific number of clients connected.

    Anyway the Main Server will also have to act like a client (Server/Client) so it can connect to the Sub Servers.

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2007
    Location
    Kurdistan, Slemani
    Posts
    43

    Re: Redirect a connection

    That wont work since the client already is created for another protocol.

    If the client connects to the main server, and I sent information about the client to one of the sub servers, and then the sub server connects to the client instead of the client connecting to the sub server, is that possible?

  4. #4
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Redirect a connection

    I meant that the main server has to have both the server and client side in it if you are going to be doing what you are trying. How else will the MainServer connect to the SubServers?

  5. #5
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Redirect a connection

    You can't redirect a client to another server if the client is using a different protocol that doesn't have any kind of redirection functionality in it.

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Redirect a connection

    This a common enough that load balancing routers exist to handle it.

    There is no real way to "redirect" an accepted TCP connection... or even one that hasn't yet been accepted. You either use a special router or design a "front end" server that performs this function. In either case though the "router" device/program will have to relay all of the conversation with the servers behind it.

    If you had the luxury of designing the client/server protocol and the clients and servers the method suggested above would be good: Have one server that clients connect to first to get back the address of a second sever (from a group of secondary servers) to make a "working" connection to.


    I wouldn't be surprised to find that there are Linux or BSD packages you can install on an old PC to make it into a TCP load balancing router. This probably isn't the solution you're hoping for though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width