Blog

Of NGINX and Pianos

By Jay

Apr 15, 2024 | 5 minutes read

Series: NGINX

Tags: blog, tech, nginx

I’ve worked with NGINX for the bulk of my career, with my first use case being the replacement of Apache on a customer’s server to help improve their web throughput. Since then, I’ve installed, recommended, used, and configured more NGINX instances than I can remember. So logically, I wound up working for NGINX for a part of my career.

With NGINX being a part of the wider F5 organization, it was necessary to explain the what, how, and why of NGINX to a wider audience. My initial drafts likened NGINX to a toilet, but reviewers noted that perhaps something less utilitarian would be more appropriate. So, I present to you ‘NGINX as a Piano’, with thanks to Elijah for both the inspiration and the numerous conversations revolving around this analogy.

There is a great deal of historical inertia behind NGINX, and it is often associated with ‘old school’ technologies and attitudes. The project is written in C and its source code is stored in Mercurial, with a read-only sync to GitHub. NGINX’s unique configuration syntax allows the server to be configured to address almost any potential use case. Unfortunately, the downside is that it is very easy to misconfigure NGINX, and finding documentation can be difficult.

Since the inception of the NGINX project, newer technologies have emerged that focus on GUIs, dashboards, and dynamic configuration. NGINX has several components that fit into this newer tech landscape—NGINX Plus includes a dashboard and API, NGINX Instance Manager offers a web-based GUI, and numerous third-party integrations provide GUIs. There are also IaaS and configuration management tools that address NGINX deployments, management, and monitoring. However, it’s important to note that underpinning all of this is the core NGINX server, managed via the same configuration files (and, in the case of NGINX Plus, API calls).

Although NGINX ‘runs the web,’ there are numerous answers to the question ‘What is NGINX?’ For example, there are three main versions of the core NGINX server (NGINX OSS, Upstream OSS, NGINX Plus), and NGINX serves as the backbone for several competitor projects, such as Kong. This is not to mention the other projects that occupy the same space as NGINX, such as Apache, Traefik, Caddy, and Envoy.

With so many choices out there, it can be difficult to know where to start. This is where the piano analogy comes in.

NGINX is an interesting product in that the ultimate goal is not to have to worry about NGINX. In this sense, NGINX is like a piano: nobody buys a piano thinking, ‘Aha! I can now spend the next several months working on the piano—tuning, cleaning, maybe some gilding.’ Instead, they focus on what the piano enables, namely making music and delighting their audience. Similarly, an NGINX operator wants to focus on what the product enables—ingress to their Kubernetes cluster, management of web services, load balancing, traffic splitting, etc.—so that they can delight their users.

However, when playing music, the piano’s condition is of utmost importance. A poorly maintained and tuned piano can make even the world’s best musician sound terrible. The same is true for NGINX; a poorly configured and maintained installation can cause a poor user experience.

Piano players tend to be very opinionated. Some have strong feelings against keyboards and electric pianos, some only want to play on concert grands, and others are comfortable playing anything with keys. This is similar to the NGINX community, where there are users who only want to interact with the product via configuration files and the command line, some who want to automate their interaction using tools like Ansible or Helm, some who prefer a GUI, and some who don’t care and use whatever is easiest.

Learning NGINX is, in many ways, similar to learning the piano. Although both are complex, they can be approached in different ways with different goals in mind.

Pianos are a commodity. There are many manufacturers, and the quality of the piano is often determined by the materials used, the craftsmanship, and the care taken in its construction. NGINX is similar in that there are many ways to get NGINX, and the quality of the NGINX experience is often determined by the care taken in its deployment and configuration. Of course, you can also choose to use a NGINX competitor, just as you can choose to play an organ instead of a piano, but the same principles apply.

Just as a musician might choose a piano based on its tone, touch, durability, and the support available from the maker, so too do consumers select technology solutions like NGINX. They look for performance, cost-effectiveness, ease of use, and reliable support—qualities where NGINX typically excels, making it a preferred choice for many. However, just as a pianist might switch to a different instrument if they need a sound that their current piano cannot produce, or if another piano offers better features or a more compelling price-performance ratio, users of technology might switch from NGINX to a competitor. This happens especially if they face scalability challenges, or if another product evolves to offer better technology or features that align more closely with the latest industry trends. In this way, the competition drives continuous innovation and adaptation, mirroring how piano manufacturers refine their instruments to meet the changing tastes and requirements of musicians, ensuring that their pianos, much like NGINX in the tech world, remain relevant and valued in a dynamic market.

In summary, NGINX is a robust tool that, like a piano, serves a critical function in the performance of many web applications. While it has its roots in more traditional, command-line based management, it has evolved to incorporate modern interfaces that cater to a range of user preferences and expertise levels. Just as the piano has adapted over centuries from the harpsichord to today’s grand piano, integrating changes that enhance its sound and playability, NGINX too adapts, integrating the latest technological innovations. The future of NGINX is set to parallel the ongoing evolution of musical instruments, continuously refining its classical features while embracing new technologies to meet the diverse and evolving demands of its users. This ensures that NGINX, like a finely crafted piano, remains both relevant and highly valued in the ever-changing landscape of web technology.