Back End Server

A back-end server is the hardware and operating system on the back end that hosts all of the applications necessary to run the web application. The back end server would fit in the Data access layer.

Software

The back end server contains the other 3 back end components:

  • Web Server
  • Database
  • Development Framework

There are many popular combinations of “stacks” for back-end servers, which contain a specific set of back end components. Some common examples include:

CombinationsComponents
LAMPLinux, Apache, MySQL, and PHP.
WAMPWindows, Apache, MySQL, and PHP.
WINSWindows, IIS, .NET, and SQL Server
MAMPmacOS, Apache, MySQL, and PHP.
XAMPPCross-Platform, Apache, MySQL, and PHP/PERL.

Web Servers

A web server is an application that runs on the back end server, which handles all of the HTTP traffic from the client-side browser, routes it to the requested pages, and finally responds to the client-side browser. Web servers usually run on TCP ports 80 or 443, and are responsible for connecting end-users to various parts of the web application, in addition to handling their various responses.

Workflow

A typical web server accepts HTTP requests from the client-side, and responds with different HTTP responses and codes, like a code 200 OK response for a successful request, a code 404 NOT FOUND when requesting pages that do not exist, code 403 FORBIDDEN for requesting access to restricted pages, and so on.

A typical web server accepts HTTP requests from the client-side, and responds with different HTTP responses and codes, like a code 200 OK response for a successful request, a code 404 NOT FOUND when requesting pages that do not exist, code 403 FORBIDDEN for requesting access to restricted pages, and so on.

The following are some of the most common HTTP response codes:

CodeDescription
Successful responses
200 OKThe request has succeeded
Redirection messages
301 Moved PermanentlyThe URL of the requested resource has been changed permanently
302 FoundThe URL of the requested resource has been changed temporarily
Client error responses
400 Bad RequestThe server could not understand the request due to invalid syntax
401 UnauthorizedUnauthenticated attempt to access page
403 ForbiddenThe client does not have access rights to the content
404 Not FoundThe server can not find the requested resource
405 Method Not AllowedThe request method is known by the server but has been disabled and cannot be used
408 Request TimeoutThis response is sent on an idle connection by some servers, even without any previous request by the client
Server error responses
500 Internal Server ErrorThe server has encountered a situation it doesn’t know how to handle
502 Bad GatewayThe server, while working as a gateway to get a response needed to handle the request, received an invalid response
504 Gateway TimeoutThe server is acting as a gateway and cannot get a response in time

Apache

Apache ‘or httpd’ is the most common web server on the internet, hosting more than 40% of all internet websites. Apache usually comes pre-installed in most Linux distributions and can also be installed on Windows and macOS servers.

NGINX

NGINX is the second most common web server on the internet, hosting roughly 30% of all internet websites. NGINX focuses on serving many concurrent web requests with relatively low memory and CPU load by utilizing an async architecture to do so. This makes NGINX a very reliable web server for popular web applications and top businesses worldwide, which is why it is the most popular web server among high traffic websites, with around 60% of the top 100,000 websites using NGINX.

IIS (Microsoft)

IIS (Internet Information Services) is the third most common web server on the internet, hosting around 15% of all internet web sites. IIS is developed and maintained by Microsoft and mainly runs on Microsoft Windows Servers. IIS is usually used to host web applications developed for the Microsoft .NET framework, but can also be used to host web applications developed in other languages like PHP, or host other types of services like FTP. IIS (Internet Information Services) is the third most common web server on the internet, hosting around 15% of all internet web sites. IIS is developed and maintained by Microsoft and mainly runs on Microsoft Windows Servers. IIS is usually used to host web applications developed for the Microsoft .NET framework, but can also be used to host web applications developed in other languages like PHP, or host other types of services like FTP.

Databases