Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Nginx Troubleshooting

You're reading from   Nginx Troubleshooting Investigate and solve problems with Nginx-powered websites using a deep understanding of the underlying principles

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher
ISBN-13 9781785288654
Length 172 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alexey Kapranov Alexey Kapranov
Author Profile Icon Alexey Kapranov
Alexey Kapranov
Arrow right icon
View More author details
Toc

Using thread pools in Nginx

Using asynchronous, event-driven architecture serves Nginx well as it allows to save up on the precious RAM and CPU context switches while processing thousands and millions of slow clients in separate connections. Unfortunately, event loops, such as the one that power Nginx, easily fail when facing blocking operations. Nginx was born on FreeBSD, which has several advantages over Linux, and one of the relevant ones is a robust, asynchronous input/output implementation. Basically, the OS kernel is able to not block on traditionally blocking operations like reading data from disks by having its own kernel-level background threads. Linux, on the other hand, requires more work from the application side, and very recently, in version 1.7.11, the Nginx team released its own thread pools feature to work better on Linux. You may find a good introduction into the problem and the solution in this official Nginx blog post at https://www.nginx.com/blog/thread-pools-boost...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime