What happens when you type A URL in your browser and press Enter??
The network is organized between clients, which request data, and servers, which store the data and manage most of the processing of this data. For example, a browser is considered a client, and a server would be the computer program serving data to that client.
A URL(Uniform Resouce locator) is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.
The DNS
DNS(Domain Name System) is a database that maintains the name of the website (URL) and the particular IP address it links to. So When we type the URL into our browser, DNS matches the URL to its unique IP address. A DNS is a list of URLs, and their IP addresses.
Protocols: TCP/IP
The Internet Protocol Suite is often referred to as TCP/IP (Transmission Control Protocol/Internet Protocol) and it also contains other types of protocols. It’s a set of rules that define how servers and clients interact over the network, and how data should be transferred, broken into packets, received, etc.
The Firewall
A firewall is a software that sets rules about what can be sent or be received into a network. In the our example, when the browser asks for the website at the address 54.172.4.191, that request has been processed by a firewall which will decide if it’s safe, or if it’s a threat to the server’s security. The browser itself can also be equipped with a firewall to detect if the IP given by the DNS request is a potential malicious agent.
Security and Encryption: HTTPS/SSL
HTTPS stands for HyperText Transfer Protocol Secure and is a secure version of the regular HTTP. This transfer protocol defines different types of requests and responses served to clients and servers over a network. In other terms, it’s the main way to transfer data between a browser and a website. HTTP and HTTPS requests include GET, POST, PUT, and others. The HTTPS requests and responses are encrypted thus safe on transit.
Load-balancer
For most websites where the traffic is consequent, it would be impossible to be hosted on a single server. Plus, it would create a Single Point of Failure (SPOF), because it would only need one attack on the said server to take the whole site down.
For higher availability and security rise, websites started augmenting the number of servers they have, organizing them in clusters, and using load-balancers. A load-balancer is a software program that distributes network requests between several servers, following a load-balancing algorithm. HAproxy is a very famous load-balancer, and an example of algorithm that we can use is the round-robin, which distributes the requests alternating between all the servers evenly and consequentially, or the least-connection, which distributes requests depending on the current server loads.
The Webserver
A web server is a software program that serves static content, like simple HTML pages, images, or plain text files. Nginx and Apache are common web serve examples. The web server is responsible for finding where the static content corresponding to the address asked for is living and serving it as an HTTP or HTTPS response.
The Application server
Having a web server is the basis of any web page. But most sites don’t just want a static page where no interaction is happening, and most websites are dynamic. That means that it’s possible to interact with the site, save the information, log in with a user name and a password, etc.
The Database
A database is a collection of data, and the DBMS is the program that is going to interact with the database and retrieve, add, and modify data in it.
The two main ones are relational databases and non-relational databases. A relational database is a collection of tables representing objects, where each column is an attribute and each row is an instance of that object. We can perform SQL (Structured Query Language) queries on those databases. MySQL and PostgreSQL are two popular relational databases. A non-relational database can have many forms, as the data inserted in it doesn’t have to follow a particular schema. Here we can take NoSQL (MongoDB).