|
-
May 10th, 2007, 06:23 PM
#1
Thread Starter
Member
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.
-
May 11th, 2007, 01:13 AM
#2
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.
-
May 11th, 2007, 06:49 AM
#3
Thread Starter
Member
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?
-
May 11th, 2007, 08:07 AM
#4
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?
-
May 12th, 2007, 12:00 AM
#5
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.
-
May 12th, 2007, 12:14 PM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|