Chapter 7. Going Forward with Nginx

In the modern, interconnected constantly changing world, nothing ends with the last pages of a book, including this one. By the time you read this, some of the new features mentioned will have become wildly popular, and some may start their way to being obsolete. Nginx as open source software with a highly devoted team of developers, vibrant community, and a huge growing install base will have hundreds of changes committed and tested. You may wonder whether there is a sure way to keep up with it. Is it needed at all? While the current fashion moves in the direction of mobile-first, cloud-connected, intelligent Internet of things, the underlying protocols and principles remain. HTTP has long moved beyond anything imagined by its inventors, and it is living through a new circle of evolution with the rapid adoption of HTTP/2 after a long and somewhat controversial period of testing in the form of SPDY. Nginx was, and is, there on the frontlines. There is little doubt that HTTP in one form or another is here to stay for a long time, and it is a safe bet to build a good chunk of your professional career around it, especially when such a wonderful tool is readily available in your kit.

Although the industry of providing Internet services is still young, the main career models are already established. If you love Nginx and have successfully read this book, you basically have two main options for moving forward.

System administration

System administration is the art of combining hardware and software together so that the sum is much more valuable than all of the parts. If you prefer more down-to-earth definitions, system administration is the operations specialist responsible for the technical components of business processes or even more to the point, web servers hosting websites, web applications, and, increasingly, the backend API endpoints. As the industry grew, the difference between software engineering and system administration became more important, and most modern businesses have separate roles for these jobs. There is a reverse trend of the so-called DevOps movement, by the way. DevOps engineers combine the administration (or -ops) skills with software development.

This book is mainly for Nginx administrators who work alongside separate development teams, and it is very natural to want to become better and more valuable at this job. There are several vast fields of knowledge that will make you better at administering web servers.

Linux/Unix operating system as a whole

Linux has long become the de facto standard run web servers, but just being familiar with it is not enough. A deep understanding of all the inner workings may become a great goal in your career. Starting from the file systems, going down to the actual bytes on the disk level, moving to the virtual memory subsystem, to processes, signals, and all the ways interprocess communication works is a long road to perfection that will pay off tremendously when you face a really tricky bug or a vicious attack. We would also recommend looking at other Unix-type free operating systems, mostly FreeBSD and OpenBSD, which are certainly worthy competitors and have a different set of basic principles at their core. They might become your personal favorites and secret weapons. You should intimately know all the processes that Nginx consists of, the way they may be controlled, and the way they communicate between themselves.

Modern Internet protocols

Included here are the actual protocols and the networking subsystems of the relevant operating systems of your web servers and your networking equipment, such as switches and routers. Being able to telnet into a web server is essential, but this is only the first step. We need to understand the building blocks of the whole stack, how the model of operations and the operating systems start from low-level frames, move to a couple of layers of packets, then organize connections that are both fault-tolerant to an extent and may adapt to different characteristics of the underlying medium. The TCP/IP stack does not stand still. You will have to learn IPv6 deeply to be relevant in the coming years, for example. The application-level HTTP may seem simple at first glance, but you will also need to know everything about TLS. Debugging networking in your particular operating system is a whole separate discipline in itself. Although good knowledge of the tcpdump filter language is a very good start, it is usually not enough. Good little examples are the Nginx directives tcp_nopush and tcp_nodelay. Being able to explain what effect they have on the connections and predicting the change in user experience is what you want.

Specific backend software used in your company

Nginx is never the only software that powers your websites unless you only host a lot of static files. The upstream software is more often than not the source of problems with your site. Getting a good grasp of how a Ruby-on-Rails or Django application operates is not that hard, but being able to successfully deploy, monitor, and debug problems with a huge Java-based backend may be a whole new full-time job.

Modern cloud platforms

One of the few contexts where the buzzword "cloud" actually has a meaning, is the cloud hosting platforms field pioneered as a mass product by Amazon with its Amazon Web Services (AWS) but now represented by many players. Using one of those platforms is a recommended way of hosting a website unless you have very specific requirements. And mastering the platform is essential. Simpler solutions like the wildly popular Digital Ocean droplets are rather easy and do not diverge much from managing a real hardware server. AWS, on the contrary, is a huge ecosystem of interconnected complex products, such as databases, queueing/messaging services, and other specialized APIs that your developers will love to use. Having knowledge and practical experience with different platforms will be a great asset for you. By the way, https://www.nginx.com provides prebuilt AMIs with Nginx Plus, the commercial version of Nginx, for Amazon EC2 at https://www.nginx.com/resources/admin-guide/setting-nginx-plus-environment-amazon-ec2/.

Automation

There are two ways to scale manual labor: delegation to other people and automation. Although the first option is certainly important, the second is much preferred on the basis of cost. Knowing your shell-fu is again essential, but do have at least one general-purpose scripting language in your toolkit. The current fashion is Python or Ruby, whereas Node.js-based Javascript is emerging as another interesting choice. Perl is still very strong with its enormous library of open source, mostly bad but sometimes very good packages named CPAN. Recent Nginx versions have the ability to encapsulate scripting language interpreters into the web server. There was an official NginxScript JavaScript interpreter announced during the nginx.conf 2015 conference, and there is also a very popular module that embeds Lua. Refer to https://openresty.org/.

Proper automation skills will open new horizons for you, especially on the modern platforms that have APIs for traditionally manual tasks such as launching a new server. Automation is the key to scaling beyond a couple of servers to tens, hundreds, and more. This is where the DevOps engineering truly shines. Being able to create and launch a server farm into production from a script feels like a whole new dimension. When speaking about actual programming, there is the second path you may choose.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.246.148