top of page
  • Linkedin
  • bluesky
  • Instagram

Notes: Putting it all together | THM

  • solbergtonje
  • 25 dec. 2024
  • 2 min läsning

Putting It All Together


Request a website

Your computer needs to know the server's IP address, for this it uses DNS

Your computer communicate with web server - HTTP protocol

The web server return HTML, JavaScript, CSS, Images etc. which your browser renders and display website



Other Components


Load Balancers

- ensure high traffic websites can handle the load

- provide a failover if a server become unresponsive

- receive request for websie and sends it to one of the multiple servers behind the load balancer

- uses different algorithms to decide which server for the request

- round-robin: sends request to eacher server in turn

- weighted: checks a server's amount of requests, sends to least busy server

- run health checks on servers: stops sending to servers not responding appropriately


Content Delivery Networks (CDN)

- cut down traffic on busy website

- host static files from website (JS, CSS, Images, Videos) and host across thousands of servers

- when user request hosted file, CDN find physically nearest server


Databases

- storing info

- webservers store and recall data

- common databases (each with specific features): MySQL, MSSQL, MongoDB, Postgres etc.


Web Application Firewall (WAF)

- sits between web request and web server

- protect webserver from hacking and DDoS attack

- analyse web requests from common attack techniques

- check if excessive amount of web requests sent by utilising rate limiting - only allow certain amount of requests from an IP per second

- requests deemed as a potential attack = dropped/never sent to webserver



How Web Servers Work


Web Server

- software listening for incoming connections

- utilise HTTP protocol to deliver web content to its clients

- common web server software: Apache, Nginx, IIS, NodeJS

- deliver files from its root directory (defined in software settings <- Nginx/Apache: /var/www/html (Linux), IIS: C:\inetpub\wwwroot (windows))


Virtual Hosts

- text-based configuration files

- web servers host multiple websites (different domain names)

- web server software checks hostname request from HTTP headers, match against virtual hosts:

- match: provide correct website

- no match: default website will be provided instead

- can have root directory mapped to different locations on hard drive (ex. website1 mapped to /var/www/website1 and website2 mapped to /var/www/website2)

- web servers have no limit to amount of different servers to host


Static vs Dynamic Content

- Static content: content never changing (pictures, javascript, CSS etc)

- Dynamic content: content can change with different requests (like blog/blogentries/searchpage = different results displayed)


Backend

- done behind the scenes (programming, scripting languages)

- can't be seen using 'view page source'

- HTML is the result of the processing from the Backend


Frontend

- everything you see in your browser


Scripting and Backend Languages

- not much limit to what backend language can achieve

- some languages: PHP, Python, Ruby, NodeJS, Perl

- these languages can interact with databases, call external services, process data from user etc.

Contact / Kontaktformulär

© 2024-2025 Tonje Solberg

bottom of page