Академический Документы
Профессиональный Документы
Культура Документы
Pagespeed is a module that have been developed on the Google developer console. This module
helps a website in gaining an optimum amount of speed. Initially this module was developed for
Apache and nginx installed on NIX boxes. But now some other websites have developed a
version that is compatible with windows. This tool can be used with Googles PAGESPEED
INSIGHTS.
Pagespeed Insights analyses your website and gives feedback regarding what can be done to
optimize your website. The issues reported by this tool can be automatically resolved by the
Pagespeed module. The analysis for Instaremedy website is given below:
Apache vs NGINX
Apache HTTP server is a solid platform for almost any web technology developed over the last
20 years. The Apache web server has been the most popular server on the internet since 1996.
Because of this popularity, Apache benefits from great documentation and integrated support
from other software projects. Apache is often chosen by administrators for its flexibility, power,
and widespread support. It is extensible through a dynamically loadable module system and can
process a large number of interpreted languages without connecting out to separate software.
Because the open-source Apache web server has been available for so many years, and has so
many users, lots of modules have been written to expand its functionality - most of these are
open-source as well.
But Apache slows down under heavy load, because of the need to spawn new processes, thus
consuming more computer memory. It also creates new threads that must compete with others
for access to memory and CPU. Apache will also refuse new connections when traffic reaches
the limit of processes configured by the administrator.
Apache uses a process-per-connection model, which did not scale well in the face of high traffic
volume and heavy pages (more embedded resources requiring more HTTP
The need for serving large number of concurrent requests is raising every day. The prediction of
C10K problem (i.e 10,000 concurrent clients) started the research on web server architecture
which could solve this problem. As a result Nginx architecture was developed.
Nginx is quite different than the traditional way in which web servers implement thread-based
models for serving the request. In the traditional thread-based models, for each client there is one
thread which is completely separate and is dedicated to serve that thread. This might cause I/O
blocking problems when process is waiting to get completed to release the resources (memory,
CPU) in hold. Also, creating separate processes consumes more resources. Nginx uses event-
driven, asynchronous, non-blocking and single threaded architecture.
By Event-driven it means that notifications or signals are used to mark the initiation or
completion of a process. Thus, the resources can be used by other process until a process
initiation event is triggered and resource can be allocated and released dynamically. This leads to
the optimized use of memory and CPU.
By Asynchronous it means that the threads can be executed concurrently without blocking each
other. It enhances the sharing of resources without being dedicated and blocked.
By Single threaded it means that, multiple clients can be handled by a single worker process as
the resources are not blocked.
Nginx do not create a new process or thread for a new request. Here the worker process accepts
the requests and process thousands of it with the implementation of highly efficient event loops.
As shown in the above diagram, Nginx can be configured to have n number of worker process
with a single master process over them.
Thus Nginx is able to do the same work with less memory as it is utilized in a much optimized
way.
Nginx Vs Apache