Md. Waresul Islam
OUTLINE Introduction to Nginx Tested OS and platforms Versions Features Reverse Proxy Load balancing Load balancing methods Advantages of Nginx Disadvantages of Nginx Who uses Nginx? References
INTRODUCTION TO NGINX  Pronounced as “Engine X”  Nginx is a web server  It is free and open source.  Created by Igor Sysoev  First publicly released in 2004  Also used as a reverse proxy, load balancer, mail proxy and HTTP cache. MD. WARESUL ISLAM
TESTED OS AND PLATFORMS MD. WARESUL ISLAM
VERSIONS There are two versions of Nginx Nginx (Free) Nginx Plus (Paid version) Nginx Plus offers additional features that not included in Nginx, such as active health checks session persistence based on cookies DNS-service-discovery integration Cache Purging API AppDynamic, MD. WARESUL ISLAM
FEATURES HTTP proxy and Web server features Ability to handle more than 10,000 simultaneous connections with a low memory Name and IP address-based virtual servers Reverse proxy with caching Load balancing with in-band health checks Limiting the number of simultaneous connections or requests coming from one address; Support for HTTP/2 with weighted and dependency-based prioritization. IPv6-compatible MD. WARESUL ISLAM
FEATURES CONTD. Mail proxy features TLS/SSL support STARTTLS support User redirection to IMAP or POP3 server using an external HTTP authentication server; User authentication using an external HTTP authentication server and connection redirection to an internal SMTP server; MD. WARESUL ISLAM
REVERSE PROXY Reverse proxy server retrieves resources on behalf of a client from one or more servers. Resources are returned to the client, appearing as if they originated from the proxy server itself. MD. WARESUL ISLAM
LOAD BALANCE Distribution of network or application traffic across multiple servers. Load balancer sits between client devices and backend servers. MD. WARESUL ISLAM
LOAD BALANCING METHODS The following load balancing methods are supported in Nginx: Round-robin. Least-connected. IP-hash. Weighted load balancing MD. WARESUL ISLAM
DEFAULT LOAD BALANCING CONFIGURATION To configure load balancing for HTTPS instead of HTTP, just use “https” as the protocol Round-robin: Requests to the application servers are distributed in a round-robin fashion. MD. WARESUL ISLAM
LEAST CONNECTED LOAD BALANCING With the least-connected load balancing, nginx will try not to overload a busy application server with excessive requests, distributing the new requests to a less busy server instead. MD. WARESUL ISLAM
IP-HASH LOAD BALANCING There is no guarantee that the same client will be always directed to the same server. A hash-function is used to determine what server should be selected for the next request (based on the client’s IP address). MD. WARESUL ISLAM
WEIGHTED LOAD BALANCING When the weight parameter is specified for a server, the weight is accounted as part of the load balancing decision. With this configuration, every 5 new requests will be distributed across the application instances as the following: 3 requests will be directed to srv1, one request will go to srv2, and another one to srv3. MD. WARESUL ISLAM
ADVANTAGES OF NGINX Lightweight with small memory footprint Handles connections asynchronously MD. WARESUL ISLAM
ADVANTAGES OF NGINX CONTD. It is more modern in design than alternative web servers It is event based, so we can handle more connections with less overhead due to context switching Uses predictable memory under load Provides high level of concurrency Serves static content quickly Use single thread Health checks MD. WARESUL ISLAM
DISADVANTAGES OF NGINX Difficulties in supporting HTTP/1.0 with backend communication. It does not accommodate as many modules / extensions as Apache. It has less community support and documentation than Apache. MD. WARESUL ISLAM
WHO USES NGINX? MD. WARESUL ISLAM
REFERENCES https://en.wikipedia.org/wiki/Nginx https://www.nginx.com/resources/wiki/ https://nginx.org/en/docs/
MD. WARESUL ISLAM

Introduction to NGINX web server

  • 1.
  • 2.
    OUTLINE Introduction to Nginx TestedOS and platforms Versions Features Reverse Proxy Load balancing Load balancing methods Advantages of Nginx Disadvantages of Nginx Who uses Nginx? References
  • 3.
    INTRODUCTION TO NGINX Pronounced as “Engine X”  Nginx is a web server  It is free and open source.  Created by Igor Sysoev  First publicly released in 2004  Also used as a reverse proxy, load balancer, mail proxy and HTTP cache. MD. WARESUL ISLAM
  • 4.
    TESTED OS ANDPLATFORMS MD. WARESUL ISLAM
  • 5.
    VERSIONS There are twoversions of Nginx Nginx (Free) Nginx Plus (Paid version) Nginx Plus offers additional features that not included in Nginx, such as active health checks session persistence based on cookies DNS-service-discovery integration Cache Purging API AppDynamic, MD. WARESUL ISLAM
  • 6.
    FEATURES HTTP proxy andWeb server features Ability to handle more than 10,000 simultaneous connections with a low memory Name and IP address-based virtual servers Reverse proxy with caching Load balancing with in-band health checks Limiting the number of simultaneous connections or requests coming from one address; Support for HTTP/2 with weighted and dependency-based prioritization. IPv6-compatible MD. WARESUL ISLAM
  • 7.
    FEATURES CONTD. Mail proxyfeatures TLS/SSL support STARTTLS support User redirection to IMAP or POP3 server using an external HTTP authentication server; User authentication using an external HTTP authentication server and connection redirection to an internal SMTP server; MD. WARESUL ISLAM
  • 8.
    REVERSE PROXY Reverse proxyserver retrieves resources on behalf of a client from one or more servers. Resources are returned to the client, appearing as if they originated from the proxy server itself. MD. WARESUL ISLAM
  • 9.
    LOAD BALANCE Distribution ofnetwork or application traffic across multiple servers. Load balancer sits between client devices and backend servers. MD. WARESUL ISLAM
  • 10.
    LOAD BALANCING METHODS Thefollowing load balancing methods are supported in Nginx: Round-robin. Least-connected. IP-hash. Weighted load balancing MD. WARESUL ISLAM
  • 11.
    DEFAULT LOAD BALANCING CONFIGURATION Toconfigure load balancing for HTTPS instead of HTTP, just use “https” as the protocol Round-robin: Requests to the application servers are distributed in a round-robin fashion. MD. WARESUL ISLAM
  • 12.
    LEAST CONNECTED LOAD BALANCING Withthe least-connected load balancing, nginx will try not to overload a busy application server with excessive requests, distributing the new requests to a less busy server instead. MD. WARESUL ISLAM
  • 13.
    IP-HASH LOAD BALANCING Thereis no guarantee that the same client will be always directed to the same server. A hash-function is used to determine what server should be selected for the next request (based on the client’s IP address). MD. WARESUL ISLAM
  • 14.
    WEIGHTED LOAD BALANCING Whenthe weight parameter is specified for a server, the weight is accounted as part of the load balancing decision. With this configuration, every 5 new requests will be distributed across the application instances as the following: 3 requests will be directed to srv1, one request will go to srv2, and another one to srv3. MD. WARESUL ISLAM
  • 15.
    ADVANTAGES OF NGINX Lightweightwith small memory footprint Handles connections asynchronously MD. WARESUL ISLAM
  • 16.
    ADVANTAGES OF NGINXCONTD. It is more modern in design than alternative web servers It is event based, so we can handle more connections with less overhead due to context switching Uses predictable memory under load Provides high level of concurrency Serves static content quickly Use single thread Health checks MD. WARESUL ISLAM
  • 17.
    DISADVANTAGES OF NGINX Difficultiesin supporting HTTP/1.0 with backend communication. It does not accommodate as many modules / extensions as Apache. It has less community support and documentation than Apache. MD. WARESUL ISLAM
  • 18.
    WHO USES NGINX? MD.WARESUL ISLAM
  • 19.
  • 20.