Wednesday 10 September 2014

Nginx Server interview Questions and Answers

Nginx Server interview Questions and Answers

What is Nginx Server?
Nginx is an open source web server and a reverse proxy server for HTTP, SMTP, POP3, and IMAP protocols with a strong focus on high concurrency, performance and low memory usage. It is pronounced as "engine x".


Who is Author of Nginx?
Igor Sysoev


In which Language Nginx is Written?
'C' Language


What is offical website of Nginx?
nginx.org


When Nginx's stable version launched?
5 August 2014


What is the Best Usage of Nginx Server?
Nginx can deploy dynamic HTTP content on a network with using of SCGI, FastCGI handlers for scripts, WSGI application servers or Phusion Passenger module. Nginx can also serve as a load balancer.


What is the Difference between Apache Web Server and Nginx?
Nginx uses an asynchronous event approach to handling multiple requests whereas Apache Web Server use the synchronous. Nginx's event-driven approach can provide more predictable performance under high loads.

Apache Web Server handling multiple request
|----A-----||-----B-----------||-------C------|

Nginx handling multiple request
 |----A-----|
    |-----B-----------|
        |-------C------|
In this way, Nginx is far better than Apache.



What are Features of Nginx?
  • Simultaneous Connections with low memory
  • Auto Indexing
  • Load Balancing
  • Reverse Proxy with Caching
  • Fault Tolerance



What are all feature of Nginx Server?

  • Ability to handle more than 10,000 simultaneous connections with a low memory.
  • Handling of static files, index files, and auto-indexing
  • Reverse proxy with caching
  • Load balancing with in-band health checks
  • Fault tolerance
  • TLS/SSL with SNI and OCSP stapling support, via OpenSSL.
  • FastCGI, SCGI, uWSGI support with caching
  • FastCGI via PHP (PHP-FPM) support with caching
  • Name- and IP address-based virtual servers
  • IPv6-compatible
  • SPDY protocol support
  • WebSockets and HTTP/1.1 Upgrade (101 Switching Protocols)
  • FLV and MP4 streaming
  • Web page access authentication
  • gzip compression and decompression
  • URL rewriting
  • Custom logging with on-the-fly gzip compression
  • Response rate and concurrent requests limiting
  • Server Side Includes
  • IP address-based Geo-Location
  • User tracking
  • WebDAV
  • XSLT data processing
  • Embedded Perl scripting
  • TLS/SSL support
  • STARTTLS support
  • SMTP, POP3, and IMAP proxy
  • Authentication using an external HTTP server
  • Upgrading executable and configuration without client connections loss and a module-based architecture.



What is the Master and Worker Processes in Nginx Server?
Master process read and evaluate configuration, and maintain worker processes.
Worker processes do actual processing of requests.


Where the Process ID does for Nginx Server? 
The process ID of the master process is written in the file /usr/local/nginx/logs/nginx.pid





What are the controls used in Nginx Server?
Nginx -s [stop | quit | reopen | reload]


What is the purpose of –s with Nginx Server?
-s parameter is used to run the executable file of nginx.


How to add Modules in Nginx Server?
Nginx modules must be selected during compile.
Run-time selection of modules is not supported by Nginx.