CAP Theorem

CAP theorem is one of those ideas everyone knows, but very few actually design with. And that’s because it’s usually taught as a formula, not as a pressure situation. So let’s do this the system designer way. Assume you’re building a distributed system. Not a single server, not a single database. Multiple nodes, multiple machines, talking over a network. The moment you distribute a system, one thing becomes inevitable: things will fail. Machines crash. Networks slow down. Packets get lost. You don’t get to opt out of this. ...

February 15, 2026 · 3 min · 533 words · Ahmad Hassan

Event Driven Architecture

Let’s talk about Event Driven Architecture. Imagine you are building an e-commerce platform. A customer places an order. What all should happen? Payment should be processed. Inventory should be updated. Email confirmation should be sent. Analytics should record the purchase. Maybe fraud detection should run. Now tell me honestly, should Order Service directly call all these services one by one? What happens if Email Service is down? Should order placement fail? What if Analytics is slow? Should customer wait? This is where tight coupling starts hurting. ...

February 15, 2026 · 4 min · 735 words · Ahmad Hassan

Microservice Architecture

Let’s talk about microservice architecture Look at the diagram first. Don’t read labels yet. Just observe the flow. A client sends a request. That request does not directly hit business logic. It first goes through an API Gateway. From there, the request fans out to multiple independent services, and those services interact with the database. That structure itself tells a story. Now let’s rewind and start from the problem. ...

February 15, 2026 · 3 min · 519 words · Ahmad Hassan

Cloud Computing

Traditional IT Introduction This section is theory-based, no hands-on. Goal: understand the basics of traditional IT infrastructure to see why cloud computing is valuable. How Websites Work Server: A machine hosted somewhere, storing website files and application code. Client (Web Browser): Requests data from the server. Network: Connects the client to the server, routes data packets back and forth. Process: Client sends request over the network. Server processes the request. Server sends back a response. Client displays the website. ...

January 31, 2026 · 7 min · 1321 words · Ahmad Hassan

IAM (Identity and Access Management)

IAM (Identity and Access Management) What is IAM? IAM = Identity and Access Management. A global service in AWS (not region-specific). Used to manage users, groups, and permissions. Root User Created by default when you make an AWS account. Has full access to everything. Should only be used for initial setup, not daily tasks. Best practice: never share or use root account for normal work. Users and Groups User = one person in your organization. Groups = logical collection of users. Groups can only contain users (not other groups). A user can: Belong to no group (not recommended). Belong to multiple groups. Example: Developers group: Alice, Bob, Charles. Operations group: David, Edward. Charles + David also in Audit group. ...

January 30, 2026 · 11 min · 2175 words · Ahmad Hassan

EC2 - Elastic Compute Cloud

Amazon EC2 EC2 = Elastic Compute Cloud AWS Infrastructure as a Service (IaaS) offering Lets you rent virtual servers (instances) on-demand EC2 Components Instances → Virtual machines (VMs) EBS Volumes → Virtual drives for storage Elastic Load Balancer (ELB) → Distributes traffic across instances Auto Scaling Group (ASG) → Scales instances automatically Instance Configuration Options OS Choices: Linux (most popular), Windows, MacOS Compute: Number of vCPUs (cores) Memory (RAM): Customizable Storage: EBS/EFS (network-attached) Instance Store (hardware-attached) Networking: Network card speed Public IP options Security Groups: Firewall rules for instance Bootstrap (User Data): Script executed at first launch Installs software, updates, downloads files, etc. Runs as root (sudo rights) Instance Types Examples Instance vCPU Mem (GiB) Storage Network Performance EBS Bandwidth (Mbps) t2.micro 1 1 EBS-Only Low to Moderate - t2.xlarge 4 16 EBS-Only Moderate 4,750 c5d.4xlarge 16 32 1 x 400 NVMe SSD Up to 10 Gbps 4,750 r5.16xlarge 64 512 EBS Only 20 Gbps 13,600 m5.8xlarge 32 128 EBS Only 10 Gbps 6,800 Free Tier t2.micro: Up to 750 hours per month free (~1 instance running continuously for a month) EC2 Instance Types Different workloads need different optimizations: compute, memory, storage, or networking. AWS provides several categories of instances to match use cases. Detail of Each Instance ->: https://instances.vantage.sh Each Category Details ->: https://aws.amazon.com/ec2/instance-types ...

January 29, 2026 · 8 min · 1680 words · Ahmad Hassan

EC2 - Instance Storage

EC2 Storage – EBS Volumes EBS = Elastic Block Store A network drive you can attach to EC2 instances. Persists data even after the instance is terminated (unlike instance store). Think of it like a network USB stick. Key Properties AZ-bound: An EBS volume is created in a specific Availability Zone (e.g., us-east-1a) and can only be attached to EC2 instances in the same AZ. One instance at a time (at CCP level): A single EBS volume cannot be attached to multiple EC2s simultaneously. Attach/detach flexibility: Can detach from one EC2 and attach to another in the same AZ. Capacity must be provisioned in advance: Specify storage size (GB) and IOPS (I/O operations per second). You pay for provisioned capacity. Performance can be increased later by resizing or changing volume type. Free Tier 30 GB of free EBS storage per month (General Purpose SSD or Magnetic). Network Latency Since EBS communicates over the network, expect slight latency compared to local storage. Snapshots EBS Snapshots allow moving volumes across AZs (and even regions). Multiple Volumes An EC2 instance can have multiple EBS volumes attached (like multiple USB sticks). Each EC2 instance usually has its own root volume, but you can add more. Unattached Volumes EBS volumes can exist unattached (not linked to any EC2) until needed. Delete on Termination Attribute controlling EBS lifecycle when instance is terminated: Root volume: By default, deleted when EC2 instance terminates. Additional volumes: By default, not deleted. Can manually enable/disable this behavior. Use case: Keep root volume to preserve logs/data after instance termination. ...

January 28, 2026 · 8 min · 1536 words · Ahmad Hassan

ELB & ASG - Elastic Load Balancing & Auto Scaling Groups

Scalability & High Availability Scalability Definition: Ability of a system to handle greater loads by adapting. Vertical Scalability (Scaling Up/Down) Increase size of instance (t2.micro → t2.large). Example: upgrading a junior operator to senior operator in a call center. Common in non-distributed systems (like databases). Limited by hardware capacity. Horizontal Scalability (Scaling Out/In, Elasticity) Add more instances instead of increasing size. Example: adding more operators in a call center. Requires distributed systems. Very common for web applications on AWS. AWS makes this easy with EC2 + Auto Scaling Groups (ASG). High Availability (HA) Definition: Running application in multiple Availability Zones (AZs). ...

January 27, 2026 · 8 min · 1624 words · Ahmad Hassan

Amazon S3

Amazon Simple Storage Service - S3 Amazon S3 = Simple Storage Service. One of the main building blocks of AWS. Marketed as infinitely scaling storage. Backbone of many websites and integrated by many AWS services. Use Cases of Amazon S3 Backup & Storage (files, disks, etc.). Disaster Recovery (replicate data to another region for failover). Archival (cheap storage with Glacier). Hybrid Cloud Storage (extend on-premises storage to the cloud). Hosting applications/media (e.g., videos, images). Data Lake (store massive datasets for big data analytics). Delivering Software Updates. Hosting Static Websites. Examples: ...

January 26, 2026 · 16 min · 3393 words · Ahmad Hassan

Databases & Analytics

AWS Databases & Analytics – Notes What is a Database? Stores data in a structured way. Allows indexes for efficient querying/searching. Unlike raw storage (EBS, S3, EFS, EC2 Instance Store), databases provide structure and relationships between data. Types of Databases a. Relational Databases (SQL) Oldest and most common type. Data stored in tables (rows & columns) with relationships. Example: Students table linked to Departments table by department_id. Query language: SQL (Structured Query Language). Scaling: Vertical (scale up) is common, horizontal scaling is harder. b. NoSQL Databases (Non-Relational) Stands for Non-SQL (not relational). Modern, built for specific purposes and flexible schema. Benefits: Flexible and schema-less. Scales horizontally (add distributed servers). High performance, optimized for specific models. Examples: Key-value stores. Document stores (JSON). Graph databases. In-memory databases. Search databases. JSON (JavaScript Object Notation) commonly used to store data. Supports nested fields, arrays, and evolving schemas. AWS Shared Responsibility Model for Databases Managed Databases (AWS responsibility): Quick provisioning. Built-in High Availability (HA). Easy scaling (vertical + horizontal). Automated backups, restore, patching, upgrades. Integrated monitoring & alerting. AWS handles OS patching & maintenance. Self-Managed Databases (Your responsibility on EC2): You handle resiliency, patching, backups, HA, fault tolerance, scaling. Much more operational overhead. Exam Tip For the CCP exam: Know which AWS managed database fits which use case. Example: RDS (Relational), DynamoDB (NoSQL key-value), Neptune (Graph), ElastiCache (In-memory), OpenSearch (Search). Key takeaway: Use AWS managed databases unless explicitly required to run your own. Managed services simplify ops, scaling, backups, and patching. ...

January 25, 2026 · 12 min · 2502 words · Ahmad Hassan
ESC