Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Nginx worker processes
PostPosted: Fri Feb 17, 2012 4:11 pm 
Offline
Senior Newbie

Joined: Sun Jan 29, 2012 2:34 pm
Posts: 15
Hi,

Sorry more of a Nginx question than linode specifically but this forum is great for answers.

When configuring nginx on a basic linode I understand I shouldn't really go for more than 1 worker process but from what I understand of nginx that means all the responses to concurrent clients will be serialized. If one response is waiting on a php script that's doing MySql queries or something that takes 5 seconds to come back does that mean in that moment any other normal requests for lets say static pages will have to wait for that 5 second page request to finish?

Thanks


Top
   
 Post subject:
PostPosted: Fri Feb 17, 2012 5:19 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
No, the behavior you described is what Apache+prefork does. Nginx can serve ten thousand other clients (or even the same client on a different connection) while it waits for the slow PHP request to finish.

I think the best practice is to have as many worker processes as you have CPU cores. But even with just one worker process, nginx can get a lot of work done.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group