Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for MultiProcess architecture integration #5

Closed
petergsnm opened this issue May 13, 2014 · 1 comment
Closed

Question for MultiProcess architecture integration #5

petergsnm opened this issue May 13, 2014 · 1 comment

Comments

@petergsnm
Copy link

Hi,

Can an application which has multiple process make use of "libuinet" (the user space TCP stack) ?

For example, I am thinking if I can integrate Nginx (which works as revere proxy) with libuinet. As you might know, in Nginx we have master process which creates several worker process. The master process creates the listen socket (to receive the requests from the clients) and all the worker listens to that socket and the synchronization is achieved through the mutex. Once a worker process accepts a connection from the client, it talks to the backend webs servers directly. So, I am wondering if the the
libuinet can work with a multiprocess application or it only works with multi threaded applications?

Any pointers how it can work with multi process applications?

Thanks...Peter

@pkelsey
Copy link
Owner

pkelsey commented May 14, 2014

I am not currently familiar with the internal details of Nginx, but it sounds like what you are talking about is multiple child processes sharing a listen socket file descriptor via their parent. That sort of thing works because the TCP/IP stack state and access synchronization mechanism is in the kernel. This model is not supported by libuinet because all of the libuinet TCP/IP stack state associated with a given network interface is in userland in one process, and building a mechanism to efficiently emulate it isn't on the libuinet roadmap.

libuinet is intended for scaling via multi-threading within one process, or multiple instances of libuinet in separate processes each owning its own set of network interfaces (the concept of network interfaces here is really virtual - you can create whatever packet/flow steering layer underneath libuinet to feed multiple processes if you like).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants