Uncategorized – Mohamed KADI https://www.mohamedkadi.com Web designer & Developer Wed, 03 Jan 2024 15:37:25 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 https://www.mohamedkadi.com/wp-content/uploads/2023/06/cropped-logo-dark-sqr-32x32.png Uncategorized – Mohamed KADI https://www.mohamedkadi.com 32 32 Scale up https://www.mohamedkadi.com/2023/10/30/scale-up/ https://www.mohamedkadi.com/2023/10/30/scale-up/#respond Mon, 30 Oct 2023 09:50:59 +0000 https://www.mohamedkadi.com/?p=647 ]]> https://www.mohamedkadi.com/2023/10/30/scale-up/feed/ 0 Secured and monitored web infrastructure https://www.mohamedkadi.com/2023/10/30/secured-and-monitored-web-infrastructure/ https://www.mohamedkadi.com/2023/10/30/secured-and-monitored-web-infrastructure/#respond Mon, 30 Oct 2023 09:49:14 +0000 https://www.mohamedkadi.com/?p=644

Why We Add Elements to the Infrastructure:

  • Scalability: We add more elements to the infrastructure to handle increased demand. As more users visit our website or application, we need additional servers and resources to ensure everything runs smoothly.
  • Redundancy: Elements like backup servers are added for redundancy. If one server fails, the backup can take over to prevent downtime.

What Firewalls Are For:

  • Security: Firewalls are used to protect our infrastructure from unauthorized access and cyberattacks. They act like a barrier that filters incoming and outgoing traffic, allowing only approved data to pass through.

Why Traffic Served Over HTTPS:

  • Encryption: HTTPS secures data in transit. It encrypts the information exchanged between a user’s browser and our servers, safeguarding sensitive data like login credentials and personal information.

What Monitoring Is Used For:

  • Performance: Monitoring helps us keep an eye on the health of our infrastructure. We use it to detect issues, like server overloads or unusual activity, before they cause problems for users.

How Monitoring Collects Data:

  • Data Collection Tools: Monitoring tools collect data through various sensors and agents installed on our servers. They continuously gather information about server performance, traffic, and other key metrics.

How to Monitor Web Server QPS:

  • Check Monitoring Tools: To monitor web server Query Per Second (QPS), check the relevant metrics in your monitoring tool. This will show you how many queries your server is handling per second.

Issues with the Infrastructure:

Terminating SSL at the Load Balancer Level:

  • Security Risk: Terminating SSL (decryption) at the load balancer can expose sensitive data. It’s safer to keep SSL encrypted end-to-end, from the user’s browser to the server.

Having Only One MySQL Server Accepting Writes:

  • Single Point of Failure: If this server fails, it disrupts the entire system. Adding a failover or replication system would ensure data integrity and availability.

Having Servers with the Same Components:

  • Uniformity Risk: If all servers have the same components, a vulnerability affecting one could affect all. Diverse configurations can enhance security and prevent a single point of failure.
]]>
https://www.mohamedkadi.com/2023/10/30/secured-and-monitored-web-infrastructure/feed/ 0
Distributed Web infrastructure https://www.mohamedkadi.com/2023/10/30/distributed-web-infrastructure/ https://www.mohamedkadi.com/2023/10/30/distributed-web-infrastructure/#respond Mon, 30 Oct 2023 09:47:49 +0000 https://www.mohamedkadi.com/?p=641

Why Adding More Components:

  • Each new component serves a specific purpose to make our system work better or handle more users.
  • More elements can improve reliability, performance, and scalability.

Load Balancer Distribution Algorithm:

  • A load balancer is like a traffic cop for our website, directing requests to different servers.
  • It uses a distribution algorithm to decide how to send requests.
  • Common algorithms include Round Robin (sending requests in order), Least Connections (to the least busy server), and IP Hash (using client IP).

Active-Active vs. Active-Passive:

  • Active-Active means both servers are actively working, sharing the load. If one fails, the other takes over.
  • Active-Passive has one active server and one standby. If the active one fails, the standby kicks in.

Primary-Replica (Master-Slave) Cluster:

  • It’s like having a boss (primary) and an assistant (replica) for our database.
  • Primary node receives all the updates, and the replica copies everything to stay in sync.

Difference between Primary and Replica:

  • Primary handles data changes (writes), while the Replica only reads data.
  • For the application, the Primary is like the editor, and the Replica is the reader.

Issues with the Infrastructure:

Single Point of Failure (SPOF):

  • SPOF is where if one part fails, the whole system stops working.
  • In this setup, if the load balancer or primary database goes down, the entire system is at risk.

Security Issues:

  • No firewall means there’s no barrier to protect our system from unauthorized access.
  • No HTTPS means data sent between users and the system is not encrypted, risking data interception.

No Monitoring:

  • Without monitoring tools, we can’t keep an eye on how our infrastructure is doing.
  • We won’t know if a component fails or if there are performance issues until it’s too late.
]]>
https://www.mohamedkadi.com/2023/10/30/distributed-web-infrastructure/feed/ 0
Simple Web Stack https://www.mohamedkadi.com/2023/10/30/simple-web-stack/ https://www.mohamedkadi.com/2023/10/30/simple-web-stack/#respond Mon, 30 Oct 2023 09:43:20 +0000 https://www.mohamedkadi.com/?p=637 Read More

]]>

Server: A server is a computer or software system that stores and delivers data or services over a network.

Domain Name: A domain name is a user-friendly address used to access resources on the internet, translated by the DNS.

DNS Record for www: Usually, “www” in a domain like “www.foobar.com” is a CNAME record pointing to the main domain.

Web Server: A web server hosts and serves web content to users’ browsers.

Application Server: An application server executes web application logic and manages data.

Database: A database stores and manages structured data used by web applications.

Server-User Communication: Servers communicate with users’ computers over the internet using HTTP.

Issues:

  1. SPOF (Single Point of Failure): Reliance on a single server poses a risk of downtime if it fails.
  2. Downtime during Maintenance: Maintenance or updates can lead to temporary unavailability.
  3. Scaling Challenges: Difficulty handling increased traffic without scaling mechanisms like load balancing or redundancy.

]]>
https://www.mohamedkadi.com/2023/10/30/simple-web-stack/feed/ 0