NGINX.COM
Web Server Load Balancing with NGINX Plus

Although virtual machines have been overshadowed in recent years by the buzz around containers, their use continues to increase. NGINX and NGINX Plus are widely used as a virtual load balancer in such deployments. In this article we spell out the many advantages of virtual load balancers for many use cases and describe how to quickly and easily implement NGINX Plus as a virtual load balancer.

Prebuilt and Build‑It‑Yourself Virtual Machines

Virtualized load balancing offers much more flexibility than hardware‑based load balancers or application delivery controllers (ADCs), and so the major hardware vendors have created virtualized offerings, commonly referred to as virtual appliances. These appliances are prebuilt, meaning that the vendor creates a virtual machine image with its proprietary software preinstalled on a particular operating system. As such, a prebuilt virtual appliance is tied to a particular hypervisor or cloud platform.

The alternative is a build‑it‑yourself virtual machine, which is even more flexible because as a software load balancer it can be installed on any supported operating system for use with any hypervisor or cloud environment. NGINX Plus fits in this category.

Virtualizing NGINX Plus

NGINX Plus is easily virtualized. Simply install it on one of the supported Linux distributions or FreeBSD. You can either start with a fresh virtual machine or clone a virtual machine you are already using.

NGINX Plus can be installed on a variety of operating systems, can work with any hypervisor and on any public or private cloud, and can take full advantage of all the features of the hypervisor or cloud platform. There are no resource limitations with NGINX Plus, as are common with virtualized versions of hardware appliances, so you are free to use as much memory, CPU, and network bandwidth as you need. You have complete freedom to tailor the NGINX Plus virtual load balancer exactly to your needs.

An added advantage of NGINX Plus as a virtual load balancer is that the software is exactly the same in every environment: on a bare metal server, in a virtual machine, or any type of cloud platform. As we will see below, this is not usually the case with virtual appliances from hardware‑appliance vendors.

If greater convenience is more important than complete customization, NGINX Plus is also available as a prebuilt virtual load balancer in the marketplaces of the major cloud vendors – Amazon Web Services (AWS), Google Cloud Platform, and Microsoft Azure. Or you can choose to install NGINX Plus yourself on a generic cloud computing instance (such as an AWS AMI) instead of using the prebuilt appliance.

Virtualizing Hardware Appliance‑Based Load Balancers

Vendors of hardware appliances take a different approach to providing their customers with a virtualized version of their load balancer. Because their software is proprietary, hardware ADC vendors do not make it available for customers to install manually. They offer only prebuilt virtual appliances, on just one operating system, often a customized and proprietary version of Linux or FreeBSD.

Another consequence of using a proprietary operating system is that the vendor has to make special arrangements with each cloud vendor where it wants the virtual appliance to work. As a consequence, virtual appliances are usually available in a limited number of clouds.

Similarly, vendors generally make virtual appliances available only for selected hypervisors, and often limit usage of hypervisor capacity, including memory and CPU (just as they do on their hardware appliances).

Another complication is that in many cases the software on the virtual appliance is not exactly the same as that distributed with the vendor’s hardware appliance. This is because certain hardware features contribute to performance on a hardware appliance, and must be emulated (or not) in new code on a virtual appliance.

Prebuilt Virtual Appliances vs. Customer‑Built Virtual Machines

There are advantages and disadvantages to both prebuilt virtual appliances and build‑it‑yourself virtual machines, but I believe that in most cases the advantages of building your own virtual machine outweigh the disadvantages.

The one advantage of using a prebuilt virtual appliance is convenience, because you don’t have to install additional software. But with that convenience you lose flexibility. As we discussed previously, prebuilt appliance vendors limit the set of hypervisors and clouds they support. In contrast, when you create your own virtual machine with NGINX Plus as the virtual load balancer, you use your own tools, choose the hypervisor and cloud you want, and upgrade on your schedule.

Building an NGINX Plus virtual machine is simple enough that a prebuilt virtual machine is only very slightly more convenient. Furthermore, the fact that the NGINX Plus software is exactly the same in any environment – bare metal servers, virtual machines, containers, and all types of cloud – mean you can have confidence that it functions consistently across all of them.

Conclusion

Whether you’re looking to deploy virtualized load balancers on premises or in the cloud, you won’t find a better solution then NGINX Plus. It is easily virtualized utilizing the tools you want to use.

Give NGINX or NGINX Plus a try on your virtual machine – start your free 30-day trial today or contact us to discuss your use cases.

Hero image
免费 O'Reilly 电子书:
《NGINX 完全指南》

更新于 2022 年,一本书了解关于 NGINX 的一切

关于作者

Rick Nelson

Rick Nelson

方案工程区域副总裁

Rick Nelson is the Manager of Pre‑Sales, with over 30 years of experience in technical and leadership roles at a variety of technology companies, including Riverbed Technology. From virtualization to load balancing to accelerating application delivery, Rick brings deep technical expertise and a proven approach to maximizing customer success.

关于 F5 NGINX

F5, Inc. 是备受欢迎的开源软件 NGINX 背后的商业公司。我们为现代应用的开发和交付提供一整套技术。我们的联合解决方案弥合了 NetOps 和 DevOps 之间的横沟,提供从代码到用户的多云应用服务。访问 nginx-cn.net 了解更多相关信息。