Is socket multiplexing possible?

Can a socket connection be multiplexed?

I need to establish several connections to yahoo sender, and I am looking for a way to do this efficiently without having to keep the socket open for every client connection.

so far I have to use one socket for each client, and it does not scale well above 50,000 connections.

Oh, my solution is for TELCO, so I need to at least hit between 250,000 and 500,000 connections

I plan to associate multiple IP addresses with one NIC to beat the 65k port limit per IP address.

Please, I would help, the insight that I can get.

** Most of my other questions on this site have not been answered :) **

thanks

+4
source share
5 answers

This is an interesting question about scaling in a serious situation.

You essentially ask: "How to establish N connections to an Internet service, where N β†’ 250,000."

The only way to do this efficiently and effectively is to group. You cannot do this on one host, so you will need to fragment and split your client base into several different servers, so that each of them processes only a subset.

The idea would be for one server to open as few connections as possible (evenly distributing the connection) while maintaining enough connections to make any service you support, keeping communication between servers at a minimum. This will mean that any two connected connections (for example, two accounts that talk a lot with each other) must be on the same host.

You will need servers and network infrastructure that can handle this. You will need a subnet of IP addresses, each server will have to be connected without taking into account the status of the Internet (i.e. your router will not do NAT so as not to monitor 250,000+ connections).

You need to talk to AOL. There is no way that AOL can handle this connection level without considering disconnecting your connection. Any service of this magnitude must be coordinated with AOL, so that you and they can deal with connectivity.

There are I / O multiplexing technologies that you should explore. Scream and era come to mind.

To write this solution with mass simultaneous and telecommunication level, I would recommend to study erlang. Erlang is designed for such situations (multi-server, mass-multi-client, multi-threaded software for the telecommunication level). It is currently used for Ericsson telephone exchanges.

+2
source

You can only multiplex several connections through one socket if the other end supports such an operation. In other words, this is a functional protocol - sockets do not have any built-in support for it.

I doubt the yahoo messenger protocol has support for it.

An alternative (for multiple IP addresses on one network adapter) is to create your own multiplexing protocol and use satellite servers, which will be converted from the multiplexing protocol to yahoo protocol.

+1
source

While you can listen on the socket for several incoming connection requests, when the connection is established, it connects a unique port on the server to a unique port on the client. To multiplex a connection, you need to control both ends of the channel and have a protocol that allows you to switch contexts from one virtual connection to another or use a stateless protocol that does not care about the client identifier. In the first case, you need to implement it at the application level so that you can reuse existing connections. In the latter case, you can get using a proxy server that monitors which server response is suitable for that client. Since you are connecting to Yahoo Messenger, I don’t think you can do this because it requires an authenticated connection and it is assumed that each connection corresponds to one user.

+1
source

I will earn a different approach that you might consider (depending on how desperate you are).

Note that implementing a TCP / IP operating system should be a common goal, but you are only interested in a specific use case. Thus, it makes sense to implement a shortened version of TCP / IP (which handles your use case, but does it very well) in your application code.

For example, if you are using Linux, you can route a pair of IP addresses to the tunnel interface and attach your application to the IP packets for this interface. Thus, you can fully implement TCP / IP (optimized for your use case) in your application and avoid limiting the operating system to the number of open connections.

Of course, this is very little work doing TCP / IP on its own, but it really depends on how desperate you are - that is, how much equipment you can afford to throw on the problem.

+1
source

Yahoo 500,000 random mail - does your telecommunications company do this on behalf of Yahoo? It seems that any solution should be scalable for many years using Moore's Law - and as far as I know, all IM clients have been quite effective for a long time, and there is no constant increase in demand, I can think of.

Why is this not a reasonable problem for solving a hardware and traditional solution?

0
source

All Articles