Create highly available services in Nutanix VPC with the Network Load Balancer

Create highly available services in Nutanix VPC with the Network Load Balancer

Nutanix AOS 7.0?and Prism Central 2024.3 versions introduces a suite of powerful features, and the most exciting one is the native Network Load Balancer available as a component of Flow Virtual Networking.

The Network Load Balancer enables high-availability service and distributes the network traffic load among multiple servers. It distributes incoming service requests evenly among multiple servers in such a way that the load distribution is transparent to users. Load balancing thus helps in achieving enhanced application performance, improved resource utilization, increased availability and reliability and scalability.

The Network Load Balancer provides load balancing capabilities up to Layer 4. It creates native load balancing rules within a VPC and it’s fully managed from Prism Central. There is no need to deploy a VM to handle the traffic, its architecture is fully distributed across AHV nodes.?

The Load Balancer does not stop the connection or buffer the whole request; instead, it sends the packet directly to the selected server after manipulating the packet. TCP and UDP sessions are maintained in the load balancer so that packets for a single session are directed to the same server.

There are some new constructs that are introduced as part of the Load Balancer feature.?

Load Balancer session

  • Deployed in a VPC
  • The session defines what protocol and port is being listened for, where the traffic is balanced to and other parameters.

Listener

  • This is the front end of the load balancer, clients connect to the listener
  • Listener checks for connection requests, using the specified protocol and port.
  • Traffic received by the listener is then routed to backend VMs per configuration.
  • Made up of a virtual IP address (VIP) and the port and protocol being balanced
  • The virtual IP is selected from the VPC attached overlay subnet

Targets

  • The VM NICs the load balancer will distribute traffic to for the session (backend servers)

Load Balancing Algorithm

  • Uses a Five-Tuple Hash to distribute traffic to the targets (source IP, destination IP, source port, destination port, protocol)

Health Check

  • Define health check parameters
  • Identify whether the VM in the backend pool is healthy or unhealthy

Although the schema above should be quite self-explanatory, let’s go through a typical configuration.

The load balancer configuration can be accessed two ways in Prism Central :

  • Within the VPC view, select the Network Load Balancer Tab
  • From the new Network Services main menu section, select the Network Load Balancer tab.

To create a new load balancing session, select Create Session

  • Provide a name for the session
  • Click Next

  • Define the Protocol and Ports that will be load balanced with this session : TCP 80 (HTTP) and TCP 443 (HTTPS) in the example
  • Assign the Listener to an Overlay Subnet of the VPC, select the Subnet you created for the LB from the dropdown list.
  • Assign the Virtual IP (VIP) for the Listener, the VIP can be assigned Statically or via DHCP
  • Enable External Connectivity to the Listener from outside the VPC (north - south), in the example the VPC is attached to NAT External Subnet, the connection to VIP will be handled with DNAT, select the Floating IP from the dropdown list.
  • Click Next

  • Click Add to select the VM NICs targets for that traffic
  • The default port is 8080, modify the value with the port number used by the webservice (TCP 80 in the example)
  • Health Check values are set by default, you can modify these values.
  • Click Next

  • In the last step you get a preview of the different Load Balancer components and the associated configuration parameters, a visual view is also available on the left.
  • Click Create Session

The session creation is straightforward, once created the session shows all targets Healthy.

Now let’s test how we can improve application resiliency with this feature.

Open a web browser and navigate to https://VIP_IP. In the example?https:// 10.38.4.50 now hit one of the web servers.

Reload the page in your browser, the load balancer sends the request to the next available server in the pool which in the example was webserver2.

Every time you reload the web page you will end up on the next available server in the pool for each new session.

Let’s stop the HTTP Web service on one of the webservers.

This operation reflects on the session status, now the webserver1 target is marked unhealthy. ?

Now reload the web page, the load balancer keeps sending the requests to the only healthy server left in the target pool.

Conclusion

Network Load Balancer, as a highly available and resilient native load balancer, can be a good alternative to traditional load balancers when it comes to load balancing traffic between virtualized workloads. In this article, we demonstrated how virtual machines in Nutanix Cloud Platform, can leverage native load balancing capabilities to enhance scale your applications and create highly available services.

Aritro Basu

Sr. Staff Consulting Architect at Nutanix | NCX #64 | Designing Nutanix on on-prem, Azure, and AWS | Designing Kubernetes and Automation on Nutanix

2 个月

This would be a big game changer for many customers.. Nicely articulated Yassine

Samer Tarabzoni

IT Infrastructure Engineer PCNSA | AWS-CLF | AZ-900 | ITILv4

3 个月

Thanks for this update Yassine Malki

Ahmed HAFIED

CONSULTANT INFRA, STOCKAGE ET VIRTUALISATION

3 个月

Thx ????

BLAMI ARSENE CARMEL KONATé

Ingénieur Systèmes | Infrastructures SI & Cloud[Certified Nutanix NCP-MCI] [Vmware-Openstack-Openshift-K8s-Podman] [zabbix-Grafana-Prometheus-Ansible-CI/CD] [Redhat-Ubuntu-Windows Server][Hycu--Veeam-Acronis backup]

3 个月

when will the AOS7 version be released?

回复
Louay Shehada

Solution Architect Engineer | Storage Solutions,Nutanix, Commvault, Data Migration & Data Center Implementation

3 个月

Amazing feature , thanks for sharing????

要查看或添加评论,请登录

社区洞察

其他会员也浏览了