TCPMUX/Multiplexer for a chat server handling 100K clients, can anyone explain it to me?

Posted on 2011-04-23
Last Modified: 2012-05-11
I am project managing a project that involves a high scalable chat server. It need to maximize the limitation of tcp connection/sockets to the server.

I know a single IRC server can handle a limited number of active connections. I have been told by implementing a multiplexer / tcpmux on top of the server. The limit can be increased.

Can somebody please explain it to me how this exactly works, I have been googling for more info for a few hours. But I cant find any practical showcases regarding to chat servers.

Thank you.
Question by:Octalys
    1 Comment
    LVL 27

    Accepted Solution


    Really TCPMUX has nothing to do with raising the number of connections. Really you have 2 choices.
    You are about to go behind kernel limits and there is nothing to do with using some 'service'.
    So there are not many choices:
    1) You may use only one server host with tuned kernel (there are better OSes then Linux for handling so many users):
    On Linux that's possible, but there are another restrictions (say if you use iptables with stateful rules "conntrack" - it is limited to 64K entries). A must tuning:
    sysctl net.ipv4.tcp_tw_recycle=1                                                                            
    sysctl net.ipv4.tcp_tw_reuse=1                        
    sysctl net.ipv4.tcp_orphan_retries=1
    echo "104854" > /proc/sys/fs/file-max
    More info (a bit outdated):

    2) You may setup many servers with a load balancing DNS server ( )
    3) You may setup 1 TCP load balancer + many backend servers say or

    Every configuration should be tested before putting it in production.



    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now