Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: How to handle concurrent requests with fastcgi?

$
0
0
I'm not using Lua, so using Lua APIs won't help me much. What I am presently doing is listening for connections on the socket. When a connection is found (which will be nginx) I accept the socket, and push the new transaction socket to a fiber-based job queue which executes it and responds when it has time. Immediately after pushing off the job, the listener socket goes back to listening. Both nginx and my application are configured for keepalive sockets.

The issue I am seeing is that I never see more than one transaction socket from nginx at a time. The listener socket never sees any new connections - nginx opens one, and uses it to sequentially send requests. To handle multiple concurrent requests, I'd expect nginx to multiplex (which it doesn't support) or open multiple socket streams to my application, which it also is not doing.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>