We’ve already spotlighted servers and hostings in our article with tips to consider when planning a Magento 2 store. This time we’ve decided to fully explore this topic and create an informative guide, which could be useful and simple for those who have no technical knowledge and programming background.
This article is based on the lecture of our Senior Frontend Developer Denis Bosak, who explains everything about servers, which kinds there are, and how static content differs from dynamic.
Introduction To Servers
A server means both a hardware (computer) and a software complex. Actually, hardware means any computer or specialized device, which performs some service functions and is able to receive requests. The interesting fact is that any computer can be transformed into a server.
It’s crucial to find out which services providers, such as Amazon, offer us. Here are four main ones:
Web Hosting is the most affordable service for hosting simple websites. You’re allocated with some space on the hard disk, receive a shared database and preinstalled PHP version. Keep in mind that it’s considered as quite an unreliable solution, as everyone uses the same database, but anyway, it’s cheap, even free sometimes.
Also, users usually don’t have access to the operating system, so if you face any technical issues or need to change the version, you can contact a support team and wait for the provider to fix it.
Using a Web Hosting allows uploading the website source code to a hosting provider’s server via FTP (File Transfer Protocol) and gain access to the common MySQL database management system for all users. There are often no additional functions, as the server and software settings, available applications, and supported programming languages are beyond the control of users.
VPS (Virtual Private Server) is a higher-ranking server powered by virtualization based on the operating system. The most frequently used ones are OpenVZ, FreeBSD Jail.
A user has a separate software environment (userspace) and superuser rights, but there is no guarantee of how many cores the processor has and how much storage space it assigns. Moreover, you can’t change the operating system, as it all depends on what type of VPS you have. Even though these are virtual machines, they frequently use a shared database, but it also completely depends on the hosting.
VDS (Virtual Dedicated Server) is almost identical to the previous one, though it’s more convenient. These are full-fledged virtual machines, which contain dedicated processor capacities and dedicated hard disk space. There are still many such virtual dedicated servers on one computer, but they’re more updated. Besides, you are allowed to change the operating system and receive a high level of support and problem solving.
Both VPS and VDS are ‘virtual’ solutions when several virtual ones are located on one physical machine. These are slightly different, but related solutions, where the resources of one server are shared among virtual machines of several users.
Dedicated Server is an advanced solution — you are allocated with a full-fledged physical computer with its own processor, hard drive, and memory. In our data centers, we use current dedicated servers optimized for 24-hours-a-day work and capable of carrying heavy loads.
To sum up, let’s take a look at an analogy in a more straightforward, non-technical language. Web Hosting is like a room in the college or university dormitory with its own strict rules and prohibitions. VPS is a shared apartment where everyone has their own rooms, but a shared kitchen. VDS is an apartment in the blocks of flats, but there is a shared yard and neighbors. Dedicated Server is eventually a comfortable, spacious cottage with a backyard and barbecue.
Typical Types Of Servers
From a software point of view, there’re many server types, which may be very confusing, but the main thing you should bear in mind is that a server is a program that provides service functions. Simply stated, it’s software that accepts requests from clients.
Web Server is both a hardware and software complex that accepts HTTPS requests from clients, usually web browsers, and sends HTTPS responses back and an HTML page, image, file, media stream, or other data.
Application Server is a software platform or framework created to efficiently execute procedures (programs and scripts), on which applications are built. An Application Server works as a collection of components available for a software developer via an API (Application Programming Interface) defined by the platform. The main task of the server components for web applications is to provide dynamic website pages.
Database Server performs database maintenance and management and is responsible for data integrity and safety as a whole. It also provides input-output operations when the client accesses information.
The client-server architecture’s main purpose is to host servers on powerful machines and give access to applications that use the database management system’s language components from less powerful client machines via external interfaces.
File Server is a dedicated server that performs file operations, stores files of any type, and gives access to them. As a rule, it has a great deal of disk space to ensure uninterrupted operation and increased data writing and reading speed.
Proxy Server is a kind of intermediary between you and another server, which somehow changes your request or somehow filters it.
In particular, Varnish is also such a server layer, which is used by more than 1.1M websites, as stated in SimilarTech. When a client contacts a system that contains Varnish, it checks at first if it already has a stored response to such a request, with the same product page, for example. If it does, then the answer is given immediately, so indeed a user doesn’t even reach the server.
The Proxy Server allows protecting the client’s computer from attacks and helps to maintain the anonymity of the client. Still, on the other hand, it can also be used to hide the website address convicted of fraud, change the content of the target website, and intercept user requests.
Firewall is a technological barrier developed to prevent unauthorized or unwanted interaction among computer networks or hosts. It monitors and filters network traffic passing through it, according to the specific rules.
Mail Server deals directly with mail — sends and receives emails. It usually works behind the scenes, while users interact with another program — a mail user agent.
DNS Server (Domain Name System) is an application created to respond to DNS queries using the appropriate protocol.
Static Vs. Dynamic Content
The static data is given as it is (HTML images, PDFs) while the dynamic content is transformed or directly created on the go. In Magento’s case, we can have loads of web pages, while we have one theme, dozens of templates, and an extensive database. As we enter a product web page, it’s built using PHP, data from the database, and available templates.
Web Servers In More Detail
In simple terms, it’s a specific server that receives data by the HTTP protocol, which is regarded as a kind of communication format with it.
According to the Web Technology Surveys, the most widely spread examples are the Apache web server and Nginx, which are also often used together. Here’s the pie chart with the top Web Server technologies:
The Web Server calls the PHP interpreter — a part that executes some code. It accesses the file system to take a file from there and a database, if necessary, then sends messages using the Mail Server, and returns the results.
At its most fundamental level, a browser requests a file that is hosted on the Web Server with the help of the HTTP protocol. As soon as the request reaches the desired Web Server, then the HTTP server receives the request, finds an appropriate document, and sends it back via HTTP. And if it doesn’t, a user sees a 404 error.
As a result, there is a wide variety of servers for any business goals and opportunities.
If you find it difficult to launch an online store, we could release you from care and save some time — we could set up Magento on development and production servers for your store and introduce server basic or advanced configuration, such as building the AWS environment.
Therefore, if you are interested in such an offer, please fill out the contact form. We will contact you as soon as possible.
We’re grateful to our Senior Frontend Developer Denis Bosak for his expertise and professional help in preparing this article.
Subscribeto our newsletter
3 Steps to Writing SEO-Friendly Ecommerce Product Description10 Dec 2020In the wake of the pandemic, we saw many industries suffer from the lockdown. A lot of businesses had to close, many lost a lot of money and had to let their staff go.
Buy Now Pay Later Functionality for Ecommerce Business03 Nov 2020We’ve recently discovered the CNN Business report, which reveals that big brands and retailers use the so-called ‘buy now, pay later’ feature, which has become a booming trend in the whole industry.
In-Store Pickup Functionality for Magento 2 Stores: Best Practices & How to Implement27 Oct 2020As stated in Retail TouchPoints, more than 90% of brands are expected to offer their customers an in-store pickup by 2021.