Computers and modern gadgets

If you are interested in web development, then, for sure, you have come across such a definition as a web server.

What is a web server?

Let's try to understand this issue.

The first thing to understand. A web server is just a computer program. Which is installed on any operating system and starts to perform some specific actions. Thus, you can install this program even on your computer from which you are watching this video, no matter what operating system you have installed.

What is this program for? Why do we need a web server?

The main job of a web server is to accept HTTP requests, process them, and issue HTTP responses.

What are these HTTP requests and responses?

We face this every day, and the most important program that allows you to work with HTTP requests and responses is a regular browser that is installed in our operating system (Google Chrome, Yandex Browser, Firefox, Internet Explorer, etc.) .

Those. requests to the web server and responses from it that occur over the HTTP protocol. This is a special set of rules that allow the browser and the web server to communicate.

Surely, you could pay attention that when typing some address in the address bar of the browser. Before the domain of the site, the protocol under which the website operates is first indicated. Either http or https.

The most important thing to understand is that after you have entered the website address into the address bar of your browser and pressed the Enter key, a request to the web server starts to be executed.

It is the web server that handles these requests. This web server can be installed on the same computer where the browser is installed. Also, this web server can be installed in some other place, another computer on the Internet. There is no difference here. Simply, with the help of a browser, we access this web server and get a response.

And according to the received http response, the browser displays the contents of the web page. The response that the web server sends contains all the necessary information so that the browser can display the web page. In the form in which it was conceived by the website developer.

A web server is such a program that is a link with server technologies.

The task of the web server is to accept a request from an HTTP client, understand which file the request occurred to, process this file and issue a response to the client.

You need to keep in mind that the web server is the link between the server-side programming language. For example, the PHP language. databases.

It must be kept in mind that the database is a separate technology (program) and does not belong to the web server.

Those. the web server received a request, passed it to some server-side programming language, or immediately received a specific file. All this is processed on the server. The server received a response from the relevant services and is already sending a response to the program that sent the request to it.

You need to understand that we can make HTTP requests not only from the browser. This can be done through the command line, through certain server applications, and so on.

In addition, the task of the web server is to create a log of errors and file accesses (log).

The next web server is user authentication and authorization. The web server allows you to determine who is accessing it, whether he has access to any files.

If the web server does not have access to any files, then the web server simply denies access to those files.

The web server also contains settings on how and what files should be processed on the web server. What to do with any folder. In general, all these rules contain a web server.

Because Since a web server is a regular program, this program can be released by various developers. Those. different companies can, according to their algorithms, develop web servers that work in one way or another.

Perhaps the most popular web servers that are available today are such web servers as: Apache, IIS, Nginx.

That, in fact, is all about web servers. The most important thing to understand without going into details. A web server is simply some kind of program that allows you to accept HTTP requests and issue HTTP responses.

In this article, we will learn what web servers are, how they work, and why they are so important.

Introduction

The term "web server" can refer to both hardware and software. Or even both parts working together.

  1. From a hardware point of view, a “web server” is a computer that stores website files (HTML documents, CSS styles, JavaScript files, pictures, and others) and delivers them to the end user’s device (web browser, etc.). .d.). It is connected to the Internet and can be accessed through a domain name like mozilla.org .
  2. From a software point of view, a web server includes several components that control the access of web users to files hosted on the server, at least this is HTTP server. An HTTP server is a piece of software that understands (web addresses) and HTTP (the protocol your browser uses to browse the web).

At the most basic level, when a browser needs a file hosted on a web server, the browser requests it via the HTTP protocol. When the request reaches the desired web server (hardware), the HTTP server (software) accepts the request, finds the requested document (if not, reports an error), and sends it back, also via HTTP.

Static web server, or stack, consists of a computer ("hardware") with an HTTP server (software). We call this "static" because the server sends hosted files to the browser "as is".

Dynamic web server consists of a static web server and additional software, most often application server And Database. We call it dynamic because the application server modifies the source files before sending them to your browser over HTTP.

For example, to get the final page you're viewing in a browser, the application server can populate an HTML template with data from a database. Sites like MDN or Wikipedia are made up of thousands of web pages, but they are not real HTML documents - just a few HTML templates and giant databases. This framework simplifies and speeds up web application maintenance and content delivery.

Active learning

Active learning is not yet available. .

Diving deeper

To load a web page, as we've already discussed, your browser sends a request to the web server, which then proceeds to look for the requested file in its own memory space. Having found the file, the server reads it, processes it as it needs, and sends it to the browser. Let's look at these steps in more detail.

File hosting

First of all, the web server must contain the website files, namely all HTML documents and related resources, including images, CSS styles, JavaScript files, fonts, and videos.

Technically, you can host all of these files on your own computer, but it's much more convenient to store them on a dedicated web server that:

  • always up and running
  • always connected to the internet
  • has a fixed IP address (not all providers provide a static IP address for a home connection)
  • operated by a third party company

For all these reasons, finding a good hosting provider is a key part of building your website. Check out the many offers from companies and choose what suits your needs and budget (offers range from free to thousands of dollars a month). You can find details in

Once you have resolved your hosting issue, all you need to do is upload your files to your web server.

HTTP communication

Second, the web server provides HTTP support. H yper t ext T ransfer P rotocol - hypertext transport protocol). As the name suggests, HTTP specifies how to transfer hypertext (i.e. linked web documents) between two computers.

A protocol is a set of rules for communication between two computers. HTTP is a stateless text protocol.

Text All commands are plain human-readable text. Doesn't save state Neither the client nor the server remembers previous connections. For example, relying only on HTTP, the server will not be able to remember the password you entered or which step of the transaction you are in. For such tasks, you will need an application server. (We will focus on these technologies in future articles.)

HTTP sets strict rules for interaction between client and server. We'll look at the HTTP protocol itself in a technical article a little later. For now, just be aware of these rules:

  • Exclusively clients can make HTTP requests, and only on servers. Servers are only capable of responding to HTTP customer requests.
  • When requesting a file over HTTP, the client must generate a file .
  • Web server must answer on every HTTP request with at least an error message.

On a web server, the HTTP server is responsible for processing and responding to incoming requests.

  1. When receiving a request, the HTTP server first checks if the resource exists at the given URL.
  2. If so, the web server sends the contents of the file back to the browser. If not, the application server generates the required resource.
  3. If none of this is possible, the web server returns an error message to the browser, most commonly a "404 Not Found". (This error is so common that many web designers spend a lot of time designing 404 error pages.)

Static and Dynamic content

Roughly speaking, the server can serve static or dynamic content. "Static" means "is served as is". Static websites are the easiest to make, so we suggest you make your first website static.

"Dynamic" means that the server processes the data or even generates it on the fly from the database. This provides more flexibility, but it is technically more difficult to implement and maintain, which makes the process of creating a site very complicated.

Take for example the page you are currently reading. The web server where it is hosted has an application server that fetches the content of the article from the database, formats it, adds it to HTML templates, and sends you the result. In our case, the application server is called Kuma , it is written in the Python programming language (using the Django framework). The Mozilla team created Kuma for the specific needs of MDN, but there are many similar applications built on completely different technologies.

There are so many application servers out there that it's hard to come up with just one. Some application servers are tailored for certain categories of websites, such as blogs, wikis, or online stores; others, called CMSs (content management systems), are more versatile. If you're building a dynamic site, spend a little time choosing the tool that suits your needs. If you don't want to learn web programming (even though that's fun in and of itself!), then you don't need to build your own application server. This will be the invention of the next bicycle.

Next steps

Now that you are familiar with web servers, you can:

  • read how difficult it is to do something on the web
  • learn more about the variety of software that can be useful for creating a website
  • move to practice: eg.

We have released a new book, "Social Media Content Marketing: How to get into the head of subscribers and make them fall in love with your brand."

A web server is a server that receives requests from the user and gives them responses - a document, page or site.


More videos on our channel - learn internet marketing with SEMANTICA

Any computer can be made a server. To do this, you need to install a special shell.

Requirements for the technical part are determined by the amount of allocated resources and speed requirements. The larger they are, the more powerful the computer should be.
To make it clear, let's give an analogy. You go to the library and ask for a book. The librarian finds the right one and passes it to you. The library is a server, it stores all the data. The librarian is the shell that accepted the request and sent the response. You are a client.
You can send a librarian for more information - similar to clicking on a link. The difference is that the same resource on the Internet can be read by an unlimited number of users at the same time.
Customer service is carried out according to a similar principle: when we come for a book, we can ask a librarian a question (search engine) or look into an index (YandexCatalog). This helps you find the information you need.

What does a web server do

Its main task is to store information. Pages, files, images, text content.
Tasks:

  • Receive requests.
  • Run programs in special programming languages ​​(server).
  • Build web pages.
  • Send them back to the user.
  • Protect information.
  • Perform visitor identification.
  • Keep a call log.
  • Serve other types of requests: mailto, etc.

To understand how a web server works, you need to understand how information is transmitted over a network. It is based on rules called protocols: any URL starts with a type indication (ftp, http://, https://, etc.).
Hyper Text Transfer Protocol - transfer protocol. Site pages always look like a hypertext document. It is the end result of any server or client program.

  • When the user enters an address or clicks on a link, the browser sends the request, encoding the information according to these rules.
  • The host to which this address is bound runs the server programs. Each of them performs its own functions.
  • The received data is decrypted, the commands are executed.
  • Hypertext is formed, encoded and sent back.
  • The browser receives the response, converts the code to html, and displays the page on the screen.

What is needed for a web server

We need a machine that will process all requests. Estimate the load that the server must support. It depends on the number of visitors: the more requests, the more power is required.

There are special companies that provide hosting services. You are renting a server. You are given a quota for hosting site files.
But if you have a simple site, then you can do it on your own.

When the issue with the server is resolved, you need to bind a static IP address to it.

The site becomes available on the web server after the domain name is registered, the DNS service resolves the addresses - binding the IP address (for example, 111.111.111.111) and the domain name (www.site.com).

The most common servers

Apache

It is a free, freely distributed product that has a lot of advantages:

  • Ongoing developer support.
  • Modules for working with server-side programming languages ​​PHP, Perl, Python, Ruby, ASP, etc.
  • Open source. Various programmers are involved in the revision to fit their needs. For example, the Russian-speaking community adapts it to the Russian encoding.
  • . It was originally created for Unix, but is now supported by Windows, Mac OS, BSD, Linux, OS/2 and Novell NetWare.
  • Safety.

When installing, specify the name of your host, for example, localhost. In the htdocs folder, which lies inside the Apachex.x folder (where x.x is the version number), copy any html page. Or create it in notepad by entering any text and save it with the html extension.

Once the file is in the folder, open your browser and type in the address: localhost://PAGENAME.html. Your text will appear on the screen - the page is opened from the server. If you see the error "Unable to access the site", then Apache is not running. Its icon is in the tray.
Click on it and select "Play". After that everything will work.

NGNIX

The share of active sites operating on it is 21.13% (Netcraft research). It is mainly used by large companies and professional developers: Yandex, Mail.ru, Rambler, etc. NGNIX can withstand a huge load of visitors, is reliable, safe and thoughtful.
It is distributed freely, but paid versions of Plus have appeared, costing from $ 2,500.

IIS

His fame is provided by the big name of the developer. It is a set of web services and is integrated with Windows. The native programming platform is ASP.NET, but you can implement an alternative, such as PHP.

Full hosting requires the installation of a server operating system from Microsoft - Windows Server. The 6th version was not intended for hosting at all, full support began in the 7th. It is purchased automatically along with the operating system and depends on its characteristics.

Installation packages

For novice programmers and developers, tools are created that allow you to deploy a web server on your computer in a few clicks.

  • openserver. A portable development environment that includes many databases, programming languages ​​and their versions, as well as additional services. For example, the PhpMyAdmin database interface. Today it is the most popular installation kit. Works even from a flash drive. Free download at low speed. For 100 rubles, the speed increases significantly.
  • Xampp. Actively maintained package: Apache, Php, Perl, MariaDB, etc. Has a control panel. Download for free.
  • . A very convenient set of all the necessary tools, including Apache, PHP, MySQL, PhpMyAdmin. Unfortunately, the latest version includes outdated distributions. In general, they are suitable for training. Judging by the forum, the project is no longer supported.

Over time, any web developer ( blogger, web designer or web programmer) will need a special test site where you can practice without any problems site development or testing another web project. Some beginners use their paid hosting resources and host at least two sites there. one worker ( basic) and the other ( additional) for testing. The test site is subjected to various tests ( installation and verification of many plugins, themes, scripts and so on).

As a result, with this layout, the main working site suffers greatly, since most of the hosting resources are consumed by the test project. However, there is another way that will allow lossless ( both financially and resource-wise) to test their sites, and we will now consider this method.

Why not?

You probably already know that in order to put your site on the Internet, you need to register a domain name, buy hosting, that is, disk space on some computer with a high-speed connection that can run PHP scripts. For sites to work properly, PHP and MySQL must be installed. All this is not available on a regular computer. How can HTML and PHP files run on your computer?

A regular file can be opened with Notepad++ or even with notepad. There, write something inside, save it, and then, without any problems, open this file in your browser and see how this file would look like hosted on the Internet. That is, we already see a working HTML page. In it, we can create a certain design, content and monitor the project without an Internet connection. In fact, we already have everything. If we want to run a PHP file using a browser, then nothing will work for us, since PHP scripts in the Windows operating system will not work without additional software.

All this is not available on a regular computer and thus there is no possibility to work with your web projects. Therefore, some beginners start spending money on additional resources of their paid hosting. But what about in this case? The answer is simple - there are special programs with which you can install your dedicated server directly on your computer.

What is a server?

What's happened server and what is the difference between a local server and what is on the network. In our case, the server does not mean a computer, but a special set of programs that ensure the optimal operation of the site. In order for the site to work, we need to install it in a special allotted place on the server (). That is, we upload the website files to a remote computer. However, without special server programs, our downloaded files will not be visible on the network. Now, for such purposes, we will create our own server on our home computer.

For this we need special programs. But which ones are better suited and what difficulties can they cause in further work? For reference, below I present the best web servers in terms of popularity around the world. However, this does not mean that they need to be installed immediately. I'll explain why later!

List of the best web servers

Currently, there are several solutions on the market from a variety of manufacturers:

  • (website: apache.org) is the most common and popular free server on the web. It is more reliable and flexible. The server is not demanding on processor resources and is able to serve many sites. The application is available for a wide range of operating systems, including Unix, Linux, Solaris, Mac OS X, Microsoft Windows, and more. At the moment, the use of Apache is 71%. However, this is a complex program that not every beginner can handle.

  • (website - www.iis.net) is another reliable server from Microsoft. It solidified in second place with 14% of network usage. After installing the program, only two programming languages ​​will be supported ( VBScript and JScript). However, you can open additional features by installing the necessary extensions for this. With the installation of such modules, the functionality of this server is greatly increased.

  • nginx (website - nginx.org/ru/) is the most popular web server on the Russian Internet. Compared to the first two, it is the simplest and does not have unnecessary functions. It is also praised for its reliability and high speed. The developer of this product is our compatriot - Igor Sysoev. In 2004 he released the first version of nginx. Now this software product closes the top three most popular web servers in the world. Its use is about 6.5%.

  • (Website: www.litespeedtech.com) - this web server does not have wide capabilities, but it has a very high speed. In terms of speed, it is 9 times stronger than the popular Apache. Much attention has been paid to safety its own system overload protection, strict http request checking, anti-ddos and much more). LiteSpeed ​​is available for Solaris, Linux, FreeBSD and Mac OS X. The usage rate of this program is 1.5%.

Of course, there are many other similar programs, but the share of their use and trust among users is not as high as these. Unfortunately, one such program is not enough for you. Not only is it advisable to use them to work with large projects, but it can also be difficult to install and configure. In addition, in addition to such servers, a separate installation and configuration of some programs is also required ( for example, to work with a database). All this causes significant difficulties for many users. How to be in that case?

Features of the local server

At the moment, there are many different distributions that can make life easier for any novice webmaster. They are very easy to install, easy to use, less demanding on resources and contain the necessary software elements for the best work.

That is local server It's not just one program not one specific web server), but a special collection, which includes lightweight versions of complex server programs. Usually the assembly includes: the server itself ( mostly Apache, but there may be others), PHP compiler ( with it, the browser can read the codes and assemble the page), database components, various installers, and many other programs. All this greatly simplifies the matter, rather than if we installed and configured each program separately.

In addition, separate modules can be connected to the basic packages of local servers to expand the functionality. Another important feature is that on some servers it is possible to work from a removable flash drive. In general, such builds are very well suited for rapid website development, testing small projects, and sometimes even large ones.

Overview of popular local servers

Here are some builds you might find useful:

  • (website — denwer.ru) is a free domestic server that is designed to work with websites, web applications or Internet pages. Its developers are Dmitry Koterov and Anton Sushchev. This product contains the necessary distributions for simplified operation. For example, this includes the Apache web server with various support, the phpMyAdmin and MySQL panel for working with databases, and other programs. You can also work from a removable flash drive. Unfortunately Denwer only supports the Windows operating system.

  • XAMPP (website - www.apachefriends.org/en/xampp.html) is a special server build from Apache friends. The necessary distributions allow you to run a full-fledged web server on it. This program is distributed free of charge and supports Windows, Solaris, Mac OS X and Linux. It also has the following advantages: the server is popular for its very simple user interface, making it a favorite for many beginners; there are multiple appearances of updated versions; the update process is very simple and user-friendly; there are additional modules. You can also download the required version from another official site - sourceforge.net/projects/xampp/files.

  • (Website: www.appservnetwork.com) is an excellent server from a Thai manufacturer, the concept of which is easy installation and configuration of all distributions in 1 minute. The first release of the assembly took place in 2001 and since then the number of users has been growing all the time. AppServ is very easy to install, it works as stable as the official and individual releases, and its reliable performance makes it possible to create a complete web server on your computer.
  • (Website: www.vertrigo.sourceforge.net) is another good and easy-to-install local server. The assembly is very flexible, has good performance and takes up little disk space. Unfortunately, it only works on Windows at the moment.
  • Zend Server Community Edition (Website: www.zend.com) is a free server from Zend, designed to work with web applications. Contains all the necessary components to quickly deploy a local server on your computer.

  • (website - open-server.ru) is a domestic portable local server that has high functionality for developing and creating websites and other web projects. Has a multilingual interface including Russian) and is designed to work in Windows OS. Supports work from removable media. This server is very good and serves as a good alternative to Denver.

  • (website - wampserver.com) - another good assembly with a Russian interface ( there are also other languages). There is a simple and clear menu, and convenient installation and configuration of the assembly does not cause any particular difficulties. Configuration can be done without affecting the configuration files, which is very useful for novice webmasters. The server is distributed free of charge and works only on the Windows platform. Unfortunately, there is no portable version yet.
  • (Website: easyphp.org) - a very simple assembly with support for the Russian language. The assembly is unremarkable, does not have huge functionality and is mainly intended for testing small projects. There is support for portable media. This server will serve as a good replacement for Denver.

So, these were the most popular web servers that deserve attention among webmasters. As you can see, there is a lot to choose from here. You can download the server you like and find out in detail the composition of its assembly on the official sites that were indicated in the description. I recommend that you download assembly data only from official sites, since other sites may post non-working distributions or with some kind of viruses. Now, many will no longer want to “force” their hosting, because with such software the process of creating sites and web applications will become more interesting and exciting! In general, study and implement!

P.S. What server do you use to test your projects? If you know any other good servers, then write in the comments about them. I will add them to the general list later.

This article will be useful to those people who already have their own website, or who are planning to open it. The article will be of particular interest to ambitious webmasters who feel that the high point of their project is just around the corner and want to prepare for the influx of page visitors.

Even those who still only dream of thousands of users on their site must have wondered: “How many users can my site withstand if they come in at the same time?” I immediately recall the well-known expression “Habraeffect” - the phenomenon of failure of a site that was not ready for numerous transitions to it after a link appeared on the Internet.

Let's assume that the site already exists (or will soon be): where to place it? Should it be classic hosting or vps server? If vps, then which one and how best to set it up? Or maybe there is no difference at all and it is easier to choose what is cheaper? In this article, we will look at several options and in practice make sure which one is best for our site.

We will experiment: set different modes of server operation and measure performance. We will simulate the load on the site using the Loaddy.com service. There you can set the number of users, the increasing type of load, and the schedule will show how the server responds to them. It is believed that one user generates approximately one request to the site within 10 seconds. As a test site, we will take a demo online store on cms moguta. It will be filled with test “products” that are displayed on the main page according to several criteria (that is, when the page is being formed, work with the database is in progress, etc.). One way or another, this will allow you to compare the modes with each other.

As a test site, we will create a vps server on Ubuntu OS. Its configuration will be . We will assume that such entry-level servers are created in most cases for new projects. The test version of the online store will be available at the ip address http://130.193.44.219/

Classic hosting will also come in handy, on which we will also upload the same online store in order to test it. You can follow our path yourself and run the same tests on your project!

Since in most cases a control panel is offered along with vps, we will make the main settings changes in it. On the vps server, 3 modes of operation are available to us:

  • apache;
  • Apache in CGI mode;
  • Nginx + php-fpm (without Apache).
But first, let's test on the hosting:

Classic low cost hosting

Errors appear when the number of visitors exceeds 50 people. Hosting stops giving content, and if you go to the hosting control panel, we can see something like this:

Your site has been restricted in the last 24 hours. Processor resources were limited for your site. You have reached the input process limit (number of simultaneously running PHP and CGI scripts, scheduled jobs and console sessions) 126 times.
Well, of course, hosting is hosting, especially inexpensive. You can, of course, find a tariff that will provide more opportunities, but all this must be taken into account, in some way you need to find out the exact data of the restrictions, and from each hosting provider.

VPS: Apache

Next in line is our test vps with apache mode, which by the way is offered by default when installing the ISP control panel.

Problems start when the number of users exceeds 90. If we log into our server via ssh and at that moment look at the list of processes using the top command, sorted using Shift + M (by the amount of memory consumed), we will see something like this:

We see that the apache2 process has grown into many children and they have eaten all the RAM of our vps server.

Here you need to make a small remark. The fact is that for the Apache server there is theoretically a mode that allows instead of this a large number of child processes for each connection to create several so-called multithreads, each of which would serve several connections. This mode is called worker, in contrast to the default prefork. But it’s not easy to install it, it’s impossible to do it in ISP-type panels, and if you get puzzled and try to do it via ssh, it turns out that for this it’s not enough to turn off prefork and turn on worker, you still need a thread-safe version of php. And if modules like Zend or IonCube are used, then they must also be thread-safe. Anyway, the official PHP site does not recommend setting this mode.

VPS: CGI

Let's see what happens when using CGI mode. To do this, you need to allow the use of PHP in CGI mode in the ISP control panel, this is done in the "Accounts - Users - User Settings" section.

A bleak picture emerged. The server refuses to give out content already with 55+ visitors, the RAM is all eaten up by the “php” processes. Next comes an attempt to restore functionality, but still everything ends in almost 100% failures.

VPS: Nginx + PHP-FPM

The time has come for a mode in which the Apache server is not used at all, Nginx works instead, and php is processed by the php-fpm module. If you are using the ISP control panel, then you must enable this mode for the user. This is also done in the section "Accounts - users - settings for the user". Also, this mode should be available in the "Settings - Features - Web server (www)" section.

Exactly what is needed! 100% availability, while the download speed and server response time are at acceptable levels, although they increase with increasing load. Nevertheless, the server copes!

Let's look at the process table at the time of the maximum load on the server:

We see that we still have a margin of available RAM. And php-fpm7.0 child processes do not grow in large numbers, but are limited to 5 instances, each of which serves several threads.

Well, it looks like the "winning mode" is defined. Let's find out how many simultaneous visitors our server can serve in this mode. But before that, let's do a little "tuning". Firstly, since apache is not used for such server operation, it can be completely disabled. We will do this in the ISP control panel in the "System - Services" section. Secondly, let's change a little the principle of starting php-fpm processes. It is dynamic by default. This means that child processes will hang in memory even when they are not needed. At the same time, the memory is not freed, and over time, these processes can grow more than we would like. Therefore, it is proposed to set the “ondemand” mode - on demand. And set the number of child processes and timeout for them.

To do this, you will need to go to the server via ssh and register these settings in the php configuration file. It is convenient to do this in a file for the user for whom the domain was created in the ISP.

It is usually located in /etc/php/7.0/fpm/pool.d

So: sudo nano /etc/php/7.0/fpm/pool.d/www-root.conf

We see the following default settings:

pm = dynamic pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_children = 5 pm.max_spare_servers = 5
To make ondemand mode work, you need to replace this with:
pm = ondemand pm.max_children = 5 pm.process_idle_timeout = 10s
And restart php-fpm with the command

sudo service php7.0-fpm restart
After that, php-fpm7.0 processes will be created on demand (when there is a load), their maximum number will be = 5, and after 10 seconds of idle time, the process will be killed, freeing up RAM.

Just in case, let's run our test again to make sure that all this amateur activity did not affect the performance of the site for the worse:

Now let's run Loaddy with a lot of visitors to see how many connections our server can handle:

The good news is that all requests were processed, albeit with a long delay, with a large number of them per second. Server response time is approaching 10 seconds with 190+ requests But let's remember the apache mode graph, where we got 4 seconds of server response already with 80+ users, while in php-fpm mode similar lags are observed with 130 requests, which we specifically highlighted cursor on the chart above.
But this is the same VPS.

top process table at the end of the test (with 200 users):

Note that after the end of testing, the memory used by pfp-fpm was freed:

So our server is ready for new loads.

It must be remembered that the site is running in nginx + php-fpm mode, which means that apache2 is not used in the work and, as a result, .htaccess is not used. This may not seem convenient, but it is the fastest possible option, and search engines are better at ranking sites that are fast.

Conclusion

In conclusion, one more small point: If you configured everything you wanted on the server and decided to disable the ISP control panel, or you ran out of license for it, please note that the “core” process from it will remain hanging on your server. Over the months, it can grow, so it's best to “kill” it and remove it from autorun and crona.

If you want to test the site yourself with Loaddy or other methods, it is available at

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE:
Computers and modern gadgets