Selecting the operating mode of the web server based on personal experience. Basics of web applications What is needed for a web server to function

If you type http://www.site/how-web-server-work/ into the address bar of your browser and press the Enter key, this page of our Website will appear on the screen.

At the most basic level, the following happened: Your browser formed a connection to the Web server, sent a request to obtain the Web page of the page, and received it.

Now a little more detail:

The URL consists of three parts:

1. Protocol (http)

2. Server name (www.site)

3. Page addresses (how-web-server-work)

The browser contacts the domain name server to translate the site name www.site into IP address, which it uses to connect to the server machine. The browser then makes a connection to the Web server at the specified IP address on port 80 or any other if so intended (We will discuss ports later in this article).

Following the HTTP protocol, the browser sent a request to the server, requesting the file http://www.site/how-web-server-work/

note that cookies can also be sent from the browser to the server.

In response, the server generated dynamic web page and sent back HTML text to display this page in your browser. Cookies can also be sent from the server to the browser in the page header. The browser reads the HTML tags and produces the Web page output on the screen.

Internet

So what is the “Internet”? The Internet consists of hundreds of millions of computers connected together in computer network. A network allows all computers to communicate with each other. Home computer can be connected to the Internet using the most different ways and devices - starting with a primitive modem for a telephone line, uploading a connection via local network (LAN) with Internet provider ( ISP).

Major Internet service providers support fiber optic lines for an entire country or region. Backbone networks are laid all over the world, connected via fiber optic lines, submarine cables or satellite links. Thus, every computer on the Internet is connected to every other computer on the Internet.

Clients and Servers

In general, all computers on the Internet can be divided into two categories: servers and clients. Computers that provide services (such as Web servers, FTP servers, cloud services) to other machines are servers. The machines that are used to connect to these services are − clients. When you connect to Google to perform a search query or use any of its services, Google provides its computer (possibly an entire cluster of powerful computers) to service your request. So Google provides the server. Your machine can also provide services to someone on the Internet. Thus, the user machine is usually a client, although it can also become a server if necessary.

A server can provide one or more services on the Internet. For example, a server computer may have software installed that allows it to act as a Web server, e-mail server, and FTP server. Client computers that join the server direct their requests to special software running on a shared server computer. For example, if you use a Web browser on your computer, it will “talk” to the Web server on the server computer. Your email application will “talk” to the server Email, and so on.

IP addresses

To connect all these machines into a network, each computer on the Internet has a unique address called IP address. A typical IP address looks like this:

The four numbers in an IP address are called octets because they can take values ​​between 0 and 255 or 2 8 possible values.

Each computer on the Internet has its own unique IP address. The server has a static IP address that rarely changes. A home computer often has an IP address assigned by the ISP when the machine connects to it. This IP address is unique for this session, but may be different next time. This way, the ISP only needs one IP address for each router it supports, not for each client.

If you're on a Windows machine, you can view a lot of information about the Internet on your computer, including your current IP address and hostname, using the command ipconfig. On a UNIX machine, you need to type nslookup V command line to display the machine's IP address.

Domain names

Because most people have difficulty remembering the sequence of numbers that make up IP addresses, and because IP addresses sometimes need to be changed, all servers and sites on the Internet also have human-readable names called domain names. For example, www.. This is easier for most of us to remember www.site than to remember 5.9.205.233

The name www.site actually consists of three parts:

1. World Wide Web name (www). In fact, you can do without explicitly specifying “www”, although, formally, this will be a different network.

2. Domain name (qriosity)

3. In the top-level domain zone (ru)

Domain names manage Domain name registrars. Registrars create top-level domain names and ensure that all names in the domain's top-level zone are unique. The registrar also provides contact information for each domain name and launches the service whois, indicating the owner of the domain. The hostname is created by the owner of the domain.

Domain name servers

A set of servers called domain name servers(DNS) maps human-readable names into IP addresses. These servers contain simple databases of names and IP addresses, and they are distributed throughout the Internet. Most individual companies, Internet service providers, and large universities support small DNS. There are also central DNSs that use data supplied by Domain Name Registrars.

When you enter the URL http://www..site, passes it to the domain name server, the server returns the correct IP address for www.site. A number of name servers may be involved in getting the correct IP address.

So, let's repeat what we read: the Internet consists of millions of machines, each with a unique IP address. Many of these cars are servers. This means that they provide services to other computers on the Internet. Many of these servers are email servers, Web servers, FTP servers, cloud service servers.

Ports

Any server makes its services available via the Internet using numbered ports, one for each service available on the server. For example, there is a server computer running a Web server and an FTP server. The web server will typically be available on port 80, and the FTP server will be available on port 21. Clients connect to the service on a specific IP address and on a specific port.

Each of the most popular services is available on a pre-known port number, but you can assign your own port number to any service.

If the server accepts connections on a port from outside world, and if the firewall does not protect the ports, you can connect to a predetermined port from any computer on the Internet and use the service. Note that there is nothing that forces you to, for example, keep the Web Server on port 80. If you installed your server and loaded the Web Server software on it, you could put the Web Server on port 999, or whatever another unused port. Then, if, for example, your machine is known as xxx.yyy.com then they can connect to it from the URL http://xxx.yyy.com:999 -":999" clearly indicates the port number through which your Web server can be reached. If the port is not specified, then the browser simply assumes that the Web server is accessible using the well-known port 80.

Protocols

Once a client is connected to a service on a given port, it accesses the service using a special protocol. Protocol is a set of logical-level conventions that allow programs to exchange data. To work together between computers on the Internet, the TCP/IP family of protocols is used. The web server uses the HTTP protocol.

Additional: Security

You can see from this description that the Web Server is a fairly simple piece of work software. It takes the name of the file sent using the GET command, receives the file and sends it to the browser. Even if you take into account all the code for handling ports, a simple Web server program consists of no more than 500 lines of code. Full-scale Web servers are more complex, but at their core they are also very simple.

Most servers set some level security to service processes. The simplest option is to request a login and password to gain access to the server. More advanced servers add additional security by establishing an encrypted connection between the server and the browser, so confidential information(eg credit card numbers) can be sent over the Internet.

This is really all that is needed for a Web server that serves standard, static web pages. Static pages are pages that do not change unless the webmaster himself edits them.

Additionally: Dynamic pages

What's happened dynamic Web pages? For example:

1. Any guest book allows you to enter a message in an HTML form, and displays new and old entries automatically.

2. Any search engine allows you to enter keywords in an HTML query form, and then it dynamically creates a page based on searching for information using these keywords.

In all these cases, the Web server does more than just “search for a file.” It processes information and generates pages depending on the specifics of the requests. In almost all cases, the Web server uses the so-called scripts- program code written in PHP, Perl, Java and other programming languages ​​to complete this process.

The pages of our website are also dynamic, created by PHP help using MySQL databases.

Web server (web-server) is a server responsible for receiving and processing requests (HTTP requests) from clients to a website. The clients are usually various web browsers. In response, the web server issues HTTP responses to clients, in most cases along with an HTML page, which can contain all kinds of files, images, media stream or any other data.

The web server also performs the function of executing scripts, such as CGI, JSP, ASP and PHP, which are responsible for organizing requests to network services, databases, file access, email forwarding and other e-commerce applications.

The term “web server” also applies to technical devices and software that perform the functions of a web server. This could be a computer that is specially selected from a group of personal computers or a workstation on which service software is installed and running.

The user's client, which is primarily a web browser, makes requests to the web server to obtain resources identified by URLs. Resources are HTML pages, digital media content, media streams, various images, data files, or any other data required by the client. In response, the web server sends the client the requested data. This exchange occurs using the HTTP protocol.

HTTP (English: HyperText Transfer Protocol) is a network protocol for the application layer of data transfer. The main principle of the HTTP protocol is the client-server technology, which ensures interaction between the network and the user.

In the case of a small organization, a web server can be an integral system, which will consist of: HTTP server - used for requests to web pages; FTP server – used to download files via the Internet; NNTP servers – provides access to news groups; SMTP server – for email.

Story

British scientist Tim Berners-Lee is considered the inventor of the first web server. Working since 1980 at the European Nuclear Research Laboratory (Conseil Européen pour la Recherche Nucléaire, CERN) as a software consultant, he began his development work. In Geneva, for his own needs, he developed the Enquire program, which used random associations to store data and laid the concept for the basis of the World Wide Web.

In 1989, Tim Berners-Lee, working on the CERN intranet, proposed the founding of a global hypertext project, which consisted of publishing hypertext documents linked by hyperlinks. The implementation of this project, in his opinion, would make it easier for CERN scientists to combine, search and exchange information. To implement the project, Tim Berners-Lee, along with his assistants, invented the URI and URL identifiers, the HTTP protocol, and the HTML language. All these technologies are now widely used in the modern Internet and can no longer be done without them.


As a result of this project, Berners-Lee developed the world's first web server, called "httpd", as well as the world's first hypertext web browser for the NeXT computer, called WorldWideWeb.

The first web browser ran on the NeXTSTEP platform, an object-oriented, multitasking operating system, and was developed using Interface Builder. The web browser interface was very simple and almost all the information was displayed in text format with only a few images. In addition to the standard FTP protocol, Tim Berners-Lee used the new HTTP protocol, which he invented. Between 1991 and 1993, Berners-Lee refined and published the technical properties of his new developments: URIs and URLs, the HTTP protocol, and the HTML language. The web browser was later renamed "Nexus" to avoid confusion with the operating system on which the browser was developed and its name.

The world's first web server and first web browser ran on the NeXTSTEP personal computer; this computer is now on display at the CERN (Microcosm) museum.

Tim Berners-Lee hosted the world's first website at http://info.cern.ch; This site is now archived. The first site appeared on the Internet on August 6, 1991. On this website it was given:

  • description of the World Wide Web;
  • instructions correct installation web server;
  • information on how to purchase a web browser;
  • other technical information.

This site was also the world's first online directory. Berners-Lee posted a list of links to other sites on it and updated it regularly.

On December 12, 1991, the world's first web server was installed at the Stanford Linear Accelerator Center (SLAC) in the United States.

Basic and additional functions

All basic and additional functions of the web server:

  • Receiving requests from web browsers via the HTTP standard using TCP/IP network protocols;
  • Searching and sending files with hypertext or any documents to the browser via HTTP;
  • Service and processing of requests, such as: mailto, FTP, Telnet, etc.;
  • Launching application programs on a web server with subsequent transfer and return of processing parameters via the CGI interface standard;
  • Operation and maintenance of navigation image maps (Image map);
  • Administration and operational management of the server;
  • Authorization of users and their authentication;
  • Maintaining a log of user requests to various resources;
  • Automated operation of web pages;
  • Support for pages that are generated dynamically;
  • Support for the HTTPS protocol for secure connections with clients.

Description of the web server

Web browsers communicate with web servers using the Hypertext Transfer Protocol (HTTP). It is a simple request and response protocol for sending information using the TCP/IP protocol. The web server receives the request, detects the file, sends it to the browser, and then closes the connection. Graphic information that is present on the page is processed in the same way. Next, it’s the web browser’s turn to display the HTML document downloaded from the Internet on the user’s monitor.

In addition to HTML pages and graphics, web servers can store any file, including text documents, word processor documents, video files and audio information. Today, if you do not take into account the questionnaires that users fill out, the bulk of web traffic is transmitted in one direction - browsers read files from the web server. But this will change with the general adoption of the PUT method described in the HTTP 1.1 draft, which allows files to be written to the Web server. Today, the PUT method is used mainly by users who create web pages, but in the future it may also be useful for other users to provide feedback to information centers. PUT requests are much simpler than regular POST uploading files to a web server.

Various applications also perform their work on the web server, the most popular of which are search engines and tools for communicating with databases. The standards used to develop these applications include the Common Gateway Interface (CGI), JavaScript scripting languages, and Java programming and VisualBasic. In addition to the CGI standard, some web server companies have created application programming interfaces (APIs), such as the Netscape Server API and the Internet Server API, which were created by Microsoft and Process Software AG. These interfaces allow developers to directly access specific web server functions. Some web servers provide middleware to connect to databases, which may require advanced programming knowledge to operate.

Basic search functions help users sort the information they need, and database utilities give Web browser users access to that information.

Web Server Overview

The criteria for choosing a web server may include different characteristics: installation, configuration, server management, administration, management of information hosted on the server, protection of this information, access control, application development functions, and performance.

Most web servers are easy and quick to install.

The most difficult part of the installation process is configuring multiple domain names on one physical device or in other words the organization of virtual servers.

Web servers have tools for managing the information module that characterizes the overall organization of the web site, and also have tools for checking the correctness of internal and external hypertext links. Netscape Communications' LiveWire package, which ships with Novell Open Enterprise Server (OES) and is optionally available with FastTrack Server, has a host management utility that lists all links for a selected page. This utility also provides a general list of all incorrect connections that it detects. O'Reilly & Associates' WebView has the same functionality and can display a detailed file tree with all invalid links highlighted in red.

There are also basic tools for managing content material. Web administrators must choose where to store files and how those files will be accessed by users accessing the web server. This requires mapping between logical URLs and physical file directories. Each software performs this operation in its own unique way.

With the increasing popularity of web servers and their increasing use in intranets, commercial activity on the Internet increases, so the importance of protecting information increases. More often than not, web server security systems are either overkill or insufficient for today's intranets. If it is necessary to restrict access to certain information within the company, then there is a choice between using unencrypted passwords that are transmitted over communication channels, and using SSL protocol(English: Secure Sockets Layer) is a complex and slow method that is used to encrypt passwords and data.

In order to organize the work of individual users and their groups can be used internal applications server or certain operating system functions. In order to organize the work of individual users and their groups, internal server applications or certain functions of the operating system can be used. The Microsoft IIS Batch Service provides support for the underlying Windows NT network operating system.

NetWare Web Server from Novell, Inc. Fully integrated with address directory services (NetWare Directory Services, NDS). It's convenient to manage users from a common center, but it can pose a security risk. Passwords are distributed unencrypted over communication channels, and if they are intercepted, not only the web server is at risk, but the security of the entire network operating system is at risk.

Application development is one of the main functions of a web server. The application development environment and database connectivity tools are very important to extend the capabilities of the web server, since application development depends on various idiosyncratic details of the application programming interface (API), as well as on the characteristics of programming languages ​​or the individual preferences of programmers.

Web servers can serve a variety of systems from a small enterprise intranet to large web information centers used by millions of people.

For small corporate intranets, the best package to use is Internet Information Server (IIS), created and distributed by Microsoft. IIS has a fairly simple installation and simple settings configurations. This web server package is well integrated with access controls, the Performance Monitor system monitoring tool, and the Event Viewer. The IIS web server also provides several tools for dynamically transferring information from databases. IIS is very fast. IIS components support protocols such as: HTTP, HTTPS, FTP, NNTP, SMTP, POP3.

To make it easier to create web information centers, most web servers come with utilities and tools for managing content. Besides HTML editors and document format converters, the most useful tools are URL controls, which ensure that all hypertext links on your Web site are working.

Any personal computer that is connected to the Internet can be turned into a web server if you install special server software on it.

The most common web servers are Apache (Apache Software Foundation), IIS (Microsoft) and iPlanet server (from Sun Microsystems and Netscape Communications Corporation). Now on the web server software market, there is a huge selection of products, both commercial and free.

One of the most common web servers is Apache from the Apache Software Foundation. It is estimated that it is used on 65% of all web servers in the world. One of the main advantages of Apache software is that it is free to distribute. The developers regularly fix bugs found and provide good user support. This web server supports a large number of modules, utilities and add-ons. Since from the very beginning Apache was developed as software for administrators and advanced users, the disadvantage is that it is difficult to configure and maintain for inexperienced webmasters.

Next in popularity is the IIS web server from Microsoft. According to Netcraft, the IIS web server accounts for 12.46% of the total number of web servers. This product is part of the Windows NT family of server software. Its main advantages are stability, high speed, and the ability to connect additional modules. Microsoft strives to ensure that any user can use its products without the help of specialists if they need to solve standard problems. Therefore, IIS is very easy to install, configure, and maintain. The web server supports .NET technology, which has recently been gaining popularity among developers and professional users. These benefits take the IIS web server to the next level and you can expect its usage to increase.

Other famous web servers:

  • nginx is a free web server and mail proxy server developed by Igor Sysoev. Simple, fast and reliable server. Works on Linux and other Unix-like systems operating systems, as well as on Windows. Popular on major websites;
  • lighttpd- free web server. Developed by Jan Kneschke. Fast and secure web server. Works on Linux and other Unix-like operating systems, as well as Windows;
  • Google Web Server- a web server that is based on Apache and is used by Google to organize its web infrastructure;
  • Resin- a free web server and application server for Java. Developed by Caucho Technology Inc.;
  • Cherokee- a free web server that is controlled only through the web interface. Written in the C programming language;
  • Rootage- a web server written in the Java programming language. Works on Linux and Windows;
  • THTTPD- a simple, small, fast and secure web server. Developed by ACME Labs Software.

Web server clients

Typically, the client is a web browser. But various other devices and programs can also access the web server:

  • A web browser installed on a desktop personal computer;
  • A web browser installed on a PDA or other portable device;
  • Mobile phones and smartphones with which the user gains access to web server resources via the WAP protocol;
  • Various programs that can access the web server independently to update or obtain other information. An example is various antiviruses that periodically contact the web server to update the database;
  • Various digital devices, as well as some household appliances.

This article will be useful to those people who already have their own website, or who are planning to open one. The article will be especially interesting for ambitious webmasters who feel that the finest hour of their project is just around the corner and want to prepare for the influx of page visitors.

Even those who are only dreaming of thousands of users on their website have probably wondered: “How many users will my website support if they log in at the same time?” I immediately remember the well-known expression “Habraeffect” - the phenomenon of a site failure that was not ready for numerous transitions to it after a link appeared on the Internet.

Let's assume that there is already a website (or there will be one soon): where should we place it? Should it be a classic hosting or a VPS server? If vps, which one and how best to configure it? Or maybe there is no difference at all and it’s easier to choose what is cheaper? In this article we will look at several options and see in practice which one is better suited for our site.

We will experiment: set different server operating modes 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 graph will show how the server reacts to them. It is believed that one user generates approximately one request to the site within 10 seconds. As a test site, let's 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 creating the page, work is done with the database, 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 these are the servers entry level 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, to which we will also upload the same online store to conduct tests. You can follow our path yourself and conduct the same tests on your project!

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

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

Classic inexpensive hosting

Errors appear when the number of visitors exceeds 50 people. The hosting stops serving content, and if we go to the hosting control panel, we can see something like the following:

Your site has been restricted in the last 24 hours. CPU resources are limited for your site. You have reached the limits on input processes (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 needs to be taken into account, and somehow find out the exact data of the restrictions 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 begin when the number of users exceeds 90. If we log into our server via ssh and at this 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 up all the RAM of our vps server.

Here we need to make a small remark. The fact is that for the Apache server, theoretically, there is a mode that allows, instead of 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, unlike the default prefork. But installing it is not easy, it is impossible to do this in panels like ISP, and if you get puzzled and try to do it via ssh, you will find out that for this it is not enough to turn off prefork and turn on worker, you also need a thread-safe version of php. And if modules like Zend or IonCube are used, then they must also be thread-safe. And in general, the official PHP website does not recommend installing this mode.

VPS: CGI

Let's see what happens when using the 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 – settings for the user.”

It turned out to be a bleak picture. The server refuses to serve content even with 55+ visitors, the RAM is all eaten up by the “php” processes. Next comes an attempt to restore functionality, but it still 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 an ISP control panel, you must enable this mode for the user. This is also done in the “Accounts - Users - User Settings” section. This mode should also be available in the “Settings – Features – Web server (www)” section.

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

Let's look at the table of processes at the moment of maximum load on the server:

We see that we still have stock at an affordable price random access memory. And child processes of php-fpm7.0 do not grow in large quantities, but are limited to 5 copies, each of which serves several threads.

Well, it looks like the “winning regime” has been determined. Let's find out how many simultaneous visitors our server can serve in this mode. But before that we’ll do a little “tuning”. Firstly, since apache is not used when the server is running this way, 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 launching php-fpm processes. By default it is dynamic. This means that child processes will hang in memory even when they are not needed. At the same time, memory is not freed and over time these processes can grow larger than we would like. Therefore, it is proposed to install the “ondemand” mode - on demand. And set the number of child processes and the timeout time for them.

To do this, you will need to log into the server via ssh and write these settings in the configuration php 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 there:

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 this, php-fpm7.0 processes will be created on demand (if there is a load), the maximum number of them 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 negatively affect the site's performance:

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. The server response time is approaching 10 seconds with a number of requests of 190+. But let's remember the graph of the apache mode, where we received 4 seconds of server response already with 80+ users, while in the php-fpm mode similar lags are observed with 130 requests, which we specifically highlighted cursor on the graph above.
But this is the same VPS.

Table of top processes at the end of the test (with 200 users):

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

This means our server is ready for new loads.

It is necessary to remember that the site operates in nginx+php-fpm mode, this means that apache2 is not used in the work and, as a result, .htaccess is not used. This may seem inconvenient, but it is the fastest option available, and search engines rank sites that are fast better.

Conclusion

In conclusion, one more small point: If you have configured everything you wanted on the server and decided to disable the ISP control panel, or your license for it has expired, keep in mind that the “core” process from it will remain hanging on your server. As months pass, it may grow larger, so it is better to “kill” it and remove it from autorun and crona.

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

The web hosting industry requires at least some basic knowledge to operate. There are several web hosting terms that every webmaster should be aware of. One of the most basic ones is: web server In reality, web hosting is made up of web servers that provide space for your website. The HP Micro AMD N40L Server is a versatile server that can provide a platform to organize and protect business information, enable effective customer communication, and make the most of your existing office equipment and resources. The HP MicroServer is a cost-effective starter server for businesses with less than 10 clients, and it can take your business to new levels of productivity and efficiency. To learn more about the HP Micro AMD N40L Server, follow this link http://vint.com.ua/product/computers/dir_3010558/dir_3010559 .

Web server can mean two things - computer, which hosts the website and program, which runs on such a computer. Therefore, the term related to the web server both hardware and software . We will look at these two types one at a time.

Web server hardware

The website is a collection web pages which are digital files that are typically written using the hypertext markup language HTML. The website will be available to the whole world all the time; for this it must be stored either on a hosting or on a computer connected to the Internet 24/7/365. Such a computer is called Web Server (note the first letters are uppercase).

You can potentially host a website on your home computer, but this requires a lot of work and constant monitoring. It is easier to buy web hosting from a company because there are thousands of them that offer this service at reasonable prices. Briefly about one of the best companies at the end of the article, you can not only get web hosting, but also a domain name and website and it's really cheap!

There are a number of requirements for a computer server - it must be fast enough, have a large amount of RAM and HDD with a large volume. But the most important thing is to have a permanent address on the Internet, also known as an IP - Internet Protocol address. If the IP address of the website is not found and it will work offline- the browser will display an error can't find website.

Web server programs and software

Programs web server This is software that runs a website on a hosting server computer. Its main goal: issue web pages; this means that it listens for requests from web browsers (also known as clients ) and responds by sending the necessary data back. This client-server interaction is a distinctive part of how a web server operates..

There are many web server programs. The most famous and popular of them is Apache, developed by the Apache Foundation. Apache is not only free, but it is also available for several operating systems, including Windows, Macintosh and Linux/Unix.

Although the terms Web server and application server are often used interchangeably to refer to the same thing, that is, to ensure the proper functioning of a website, they are not the same thing. Rather, they work together to deliver content from websites to end users. A web server may refer to a program that accepts and fulfills incoming requests from clients for web resources around the world. It serves these requests along with optional content, which is usually HTML pages, image files, video files, etc. The application server serves dynamic content to end users using different protocols, including HTTP. This article explains the difference between the two.

What is a web server?

A web server is nothing more than a software program designed to handle web requests. It accepts incoming requests in the form of static content, which are basically website components including HTML pages, graphics and video files, etc. It then responds to requests over HTTP along with additional data content. The main job of a web server is to provide content to the World Wide Web to make it accessible to end users. It can refer to a system made up of hardware or software, or where web content is stored. Speaking in simple words, a web server is a computer that delivers web pages as they are requested. Apache is the most popular and widely used open source web server developed and maintained by the Apache Software Foundation.

What is an application server?

Application server is a term that is often confused with web server, except that it may use different strategies to handle requests initiated by the web server. This makes it easier to host and deliver high-quality business applications. It is often viewed as a three-tier application consisting of GUI user (GUI), application server and database and transaction server. It serves business logic to application programs through various protocols, including but not limited to HTTP. It is a software framework that provides all the capabilities needed to create and run web-based and enterprise applications. Instead of serving static content, it is best suited for serving dynamic content and transferring applications from one device to another.

Difference between web server and application server

Web and Application Server Basics

A web server refers to the hardware or software, or both, that delivers content or services to end users over the World Wide Web. It is more like a program that responds to incoming network requests for web resources using the HTTP protocol. It is also known as an Internet server. On the other hand, an application server is a component-based software framework that makes it easier to develop and run web applications. Essentially, it is a middle-tier server program designed to provide business logic for application programs.

The web server is limited to HTTP content only, meaning it uses the HTT protocol to store, process, and deliver content to clients. It is a powerful computer that makes websites accessible over the Internet, and communication between the client and server is done using HTTP. The application server is not limited to sending static HTML content; In fact, it communicates business logic to client applications using multiple protocols.

Web server and application server function

The job of a web server is to accept and respond to requests from users that are redirected by their computers' HTTP clients, which can be either from a web browser or from mobile application. The main purpose of a web server is to make static content available for users to view in web browsers. The job of an application server is to host and publish applications and business logic processes using several different protocols. It works in conjunction with a web server.

Multithreading

The web server responds to requests coming from multiple connections simultaneously, but cannot process multiple simultaneous requests in parallel. The idea of ​​using threads to improve processing speed simply doesn't work with web servers. On the other hand, application servers support multi-threading as well as a number of other features such as isolation sharing, pooling, load balancing, clustering, etc.

Web server and application server capacity

Web server is based on internet and intranet related programs to serve email, download requests FTP files, and to create and publish web pages for clients using the HTTP protocol. It can be used alone or as a component in an application server. On the other hand, application servers can do everything that application servers can do and much more. They are more capable of creating dynamic content to serve both web and enterprise applications.

Web Server vs Application Server: Comparison Table

Summary of Web Server Vs. Applications server

Web servers play a fundamental role in how the Internet works, without which the Internet ceases to exist. In simple terms, web servers act as a gateway between the user and the World Wide Web. It is a system designed to deliver static content to end users over the Internet. It is limited to requesting serving clients via HTTP protocol only. In contrast, application servers are more resource-intensive, which provide middleware services to client applications via various protocols, including HTTP. It is a platform designed for installation, operation and hosting of applications and services for end users. Although both are necessary for the website to function properly, they are very different from each other.


Top