NGINX is the best-in-class load balancing solutions used by high-traffic websites such as Dropbox, Netflix, and Zynga.
This is a presentation describing about Load balancing microservices running over container using Nginx, it's use cases and simple configuration.
3. CONTAINERIZATION
• Containerization is a lightweight alternative to full
machine virtualization that involves encapsulating an
application in a container with its own operating
environment.
• Docker containers are designed to run on everything
from physical computers to virtual machines, bare-
metal servers, OpenStack cloud clusters, public
instance and more.
4. CONTAINERIZATION
• Abstraction of the host system away from the
containerized application.
• Extremely lightweight, isolated execution
environments.
• Simple Dependency Management and Application
Versioning
8. SOLUTION:
• Load Balancing using multiple Duplicate server.
CHALLENGE:
• Each server will have it’s unique IP.
• Handling multiple IPs.
9. LOAD BALANCER
• Load balancing refers to efficiently distributing
incoming network traffic across a group of backend
servers, also known as a server farm or server pool.
• Distributes client requests or network load efficiently
across multiple servers
10. LOAD BALANCER (cont..)
• Ensures high availability and reliability by sending
requests only to servers that are online
• Provides the flexibility to add or subtract servers as
demand dictates
11. NGINX:
NGINX was written by Igor Sysoev, a Russian
system and software engineer. From the very beginning
NGINX was created with a vision on how the pressure
for content and the increasing number of web and
mobile users will transform the essential infrastructure
elements used by the Internet focused companies.
12. NGINX:
NGINX has been really successful with customers in
a Variety of market areas which include Service
providers, Media & Entertainment, Online Retail, Social
Media and more.
Today over 10% of the top 1,000,000 Internet web
sites and 25% of the top 1,000 web sites run on NGINX,
including Groupon, LivingSocial, Playdom, Zappos,
Hulu, TechCrunch, Dropbox, Yandex, WordPress and
many others.
13. NGINX:
• NGINX is the best-in-class load balancing solutions
used by high-traffic websites such as Dropbox, Netflix,
and Zynga.
• As a software-based load balancer, NGINX is much
less expensive than hardware-based solutions with
similar capabilities.
• The comprehensive load balancing capabilities in
NGINX enables to build a highly optimized application
delivery network.
14. NGINX: (cont..)
The following load balancing mechanisms (or methods) are supported
in nginx:
• round-robin — requests to the application servers are distributed in
a round-robin fashion,
• least-connected — next request is assigned to the server with the
least number of active connections,
• ip-hash — a hash-function is used to determine what server should
be selected for the next request (based on the client’s IP address).
15. Default Nginx load balancing configuration:
The simplest configuration for load balancing with nginx may look like
the following:
24. Conclusion:
• NGINX has the lowest memory footprint possible and
optimizes CPU usage while delivering maximum
performance even on a very inexpensive server
hardware.
• NGINX supports all the major standards and
protocols, providing the set of features necessary
today to build a scalable web setup.
• NGINX configuration is logical and flexible and allows
more efficiency and scalability in day-to-day
engineering.
A containerized application should not rely on or be concerned with details about the underlying host's resources or architecture. This simplifies development assumptions about the operating environment. Likewise, to the host, every container is a black box. It does not care about the details of the application inside.
Containers are isolated at the process level, sharing the host's kernel. This means that the container itself does not include a complete operating system, leading to almost instant startup times. Developers can easily run hundreds of containers from their workstation without an issue.
The host system does not have to be concerned with the dependencies needed to run a specific application. As long as it can run Docker, it should be able to run all Docker containers.
routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance.
If a single server goes down, the load balancer redirects traffic to the remaining online servers.
When a new server is added to the server group, the load balancer automatically starts to send requests to it.
routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance.
If a single server goes down, the load balancer redirects traffic to the remaining online servers.
When a new server is added to the server group, the load balancer automatically starts to send requests to it.
A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client requests to the appropriate backend server. A reverse proxy provides an additional level of abstraction and control to ensure the smooth flow of network traffic between clients and servers.