# Multiplexing a a large number of front-end connections among a few back-end connections

**URL:** <https://www.ruby-forum.com/t/multiplexing-a-a-large-number-of-front-end-connections-among-a-few-back-end-connections/219185>\
**Category:** NGINX\
**Created:** [April 23, 2012, 10:21am UTC](https://www.ruby-forum.com/t/multiplexing-a-a-large-number-of-front-end-connections-among-a-few-back-end-connections/219185 "2012-04-23T10:21:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [April 23, 2012, 10:21am UTC](https://www.ruby-forum.com/t/multiplexing-a-a-large-number-of-front-end-connections-among-a-few-back-end-connections/219185/1 "2012-04-23T10:21:40Z")

</div>

Hello,

I have a scenario where an NGINX instance is holding persistent HTTP  
connections from 50,000 clients. Sporadic requests from these clients  
have to be multiplexed over a few socket connections to back-end servers  
over a different binary protocol.

Is it possible to write a module to do this. i.e., incorporate the  
non-HTTP upstream sockets in NGINX’s main event loop? And proxy the  
requests and responses via an id I supply between the HTTP client and  
the non-HTTP back-end? The few back-end connections are multiplexed,  
bi-directional and support out-of-band messaging.

I have tried googling for this and am unable to figure out a way to do  
this.

Regards,  
Amit

Posted at Nginx Forum:

> **[Multiplexing a a large number of front-end connections among a few back-end...](https://forum.nginx.org/read.php?2,225644,225644#msg-225644)**
>
> Hello, I have a scenario where an NGINX instance is holding persistent HTTP connections from 50,000 clients. Sporadic requests from these clients have to be multiplexed over a few socket connections to back-end servers over a different binary...
