Interview with the author of Nginx HTTP server, Clément Nedelcu
As promised, here is an interview with Clément Nedelcu, author of the first English book on the Nginx web server, namely Nginx HTTP Server from Packt Publishing.
Hello. Can you introduce yourself to our readers?
Hi Ludovico and thanks for your review. My name is Clément Nedelcu and I am a French native currently residing in China. I have worked in the computer science industry for almost ten years now and I own a large network of popular websites. Although back in the day I was more into programming (Delphi, PHP, C# with .NET), I have progressively switched to Linux system administration applied to the Web. Lately I worked as a technology consultant for a small company called Coforcert during my time in France, running .NET development seminars mainly, and I now teach various subjects of computer science at a Chinese University near Shanghai (Linux technologies, Web design and .NET development) on top of my network management activities.
How did you discover Nginx?
I suppose the same way as most people did. As my websites grew more and more popular, my servers experienced massive slowdowns. Upgrading to more powerful computers didn’t help, so I asked a friend for help. He advised against using Apache and said it was cluttering the servers completely. As a replacement he suggested Nginx, which he had been running on his network for a while. I looked into this little gem, installing it as simple reverse-proxy at first, then I wanted more and replaced Apache by Nginx completely. It has never let me down since, and it even resisted DDoS attacks!
What problem did Nginx solve for you?
Well clearly the page serving speeds. With Apache, it came to a point where people couldn’t load my websites at all. The average load time was over 11 seconds per page, and at peak times the requests downright timed out! I have it under two seconds now which is a miracle considering the amount of resources we have on those pages (images and backgrounds, script files, CSS files…). Additionally, I find the Nginx configuration to be easier to manage than Apache’s, but that is merely a matter of opinion.
What’s Nginx’s killer feature?
The overall design of the application is its killer feature: scalability, performance, efficiency. It does wonders with so little resources! On my most active web server, with 500 active connections the RAM usage is under 20 megabytes, and the CPU usage rarely exceeds 0.3% (8-core Intel CPU). The rest of the resources is used by third-party applications such as PHP.
The book includes a mini guide to the basics of the Linux command line and the Linux filesystem. Are you seeing people migrating away from Windows Server/IIS towards Linux and Nginx?
I have had several people ask me what this first chapter was for. Although the final decision was ultimately mine and mine only, the publisher recommended me to start the book with a few reminders on basic Linux system commands. I don’t think it was a bad idea considering the target audience, but naturally most Linux users won’t waste their time with this chapter. I don’t see Windows Server administrators specifically switching to Linux/Nginx but if they are concerned about performance then why not?
Nginx has a reputation to scale and serve well under high loads. What made you decide to target the book towards beginners?
The reasoning is simple: Nginx is an excellent and easy-to-use web server, so why is it so far behind Apache in terms of web server market share? One of the answers you could provide is the lack of proper English documentation for beginners. Sure the Nginx Wiki is an excellent source of information and there are many well-explained blog articles detailing the process of setting up and configuring Nginx. But there needed to be something straight, detailed and easy enough for beginners to completely understand and come to master. A lot of people (including me) learned about Nginx by reading blog articles that explained how to set it up, and provided example configurations that could be used and adapted without really understanding the functioning of the application. The book helps understanding everything from the start to the most advanced directive. I believe that a book about Nginx will certainly help increase its popularity, that it will help spread the word about this awesome web server. With no other Nginx-related book on the market, it might have seemed strange to target the book at advanced administrators who would already be familiar with Nginx. I wish I could have discussed more advanced topics in the book (particularly load-balancing which I find to be an interesting subject) but I was given a limit of 250 pages, which as you may have noticed I exceeded by far.
What is the part of the book you are most proud of?
Well this was my first attempt at writing and as pointed out by Matthew Helmke in his review, the writing style may seem inconsistent throughout the chapters. But if there’s one thing I can be proud of is that I have (and I encourage readers to continue doing so) participated in porting the information that I have gathered in the book to the Nginx Wiki for everyone to read. Obviously the wiki was an important source of information for the book and I wish to give back everything I can by completing all the missing directives and documentation. The publisher has already granted us the authorization to do so. Gathering information about missing directives, and finding out more about important configuration sections was quite difficult considering the lack of English documentation on the Web. I often had to look into the application source code and even refer to the IRC channel or the mailing lists to ask for information about the more obscure directives. I even got help from Igor Sysoev himself at first but unfortunately he quickly became too busy to help.
Is there anything you would like to tell prospective readers before closing?
I want to tell them that this book is an excellent way to get started with Nginx. As my friend Martin would say: “teach a man to fish!” It is dangerous to start by reading random blog articles, copying and pasting a configuration file without understanding what you are doing, and crossing your fingers hoping for Nginx to work. You’d better understand the fundamentals and learn to create your configuration by yourself rather than using examples that weren’t designed for what you are trying to achieve. The book also describes multiple setups so if you have (like me) already installed Nginx as reverse proxy by fear of breaking your Apache configuration, you should definitely give this a read and figure out how to run Nginx all by itself. Performance-wise, it is well worth it!