@farhanhelmycode@AcapAqil we are all know why system are build in the first place .. because K*o*i ๐. lain drpd tu haahahahah faham2 old habit never change
SYSTEM DESIGN FUNDAMENTALS
System design is simply about how you plan, structure, and connect different parts of a system so it works efficiently at scale. Think of it like designing a city โ roads, buildings, traffic flow, utilities โ everything must work together smoothly.
When you build small apps, design doesnโt matter much. But once users grow, things break unless the system is well designed.
WHAT IS SYSTEM DESIGN
System design is the process of defining architecture, components, data flow, and interactions of a system.
You are answering: โ How will users interact with the system
โ How will data move
โ How will the system scale
โ How will it stay fast and reliable
HIGH-LEVEL VS LOW-LEVEL DESIGN
HIGH-LEVEL DESIGN (HLD) โ Focuses on the big picture
โ Defines system architecture
โ Shows major components and how they connect
Example: โ Client โ API โ Database โ Cache
LOW-LEVEL DESIGN (LLD) โ Focuses on details inside components
โ Classes, functions, database schema
Example: โ How a โUser Serviceโ is implemented internally
CORE COMPONENTS OF A SYSTEM
CLIENT โ The user interface (web, mobile, etc.)
โ Sends requests to the server
SERVER โ Processes requests
โ Contains business logic
DATABASE โ Stores data permanently
CACHE โ Stores frequently accessed data for speed
LOAD BALANCER โ Distributes traffic across servers
HOW A REQUEST FLOWS
User clicks a button
โ Request goes to server
โ Server checks cache
โ If not found โ queries database
โ Processes logic
โ Sends response back
This flow must be fast and reliable.
SCALABILITY
Scalability means handling more users without breaking.
VERTICAL SCALING โ Add more power to one machine (CPU, RAM)
HORIZONTAL SCALING โ Add more machines (servers)
Best practice: โ Use horizontal scaling for large systems
LOAD BALANCING
A load balancer spreads traffic across servers.
User requests
โ Load balancer
โ Server 1 / Server 2 / Server 3
This prevents overload and improves availability.
DATABASE BASICS
SQL DATABASES โ Structured data
โ Strong consistency
โ Example: MySQL
NOSQL DATABASES โ Flexible data
โ High scalability
โ Example: MongoDB
Choice depends on system needs.
CACHING
Caching improves speed by storing frequently used data.
Without cache
โ Every request hits database (slow)
With cache
โ Data served instantly
Tools: โ Redis
โ Memcached
CONSISTENCY VS AVAILABILITY (CAP IDEA)
You canโt have everything perfectly.
CONSISTENCY โ All users see the same data
AVAILABILITY โ System always responds
PARTITION TOLERANCE โ System works even with network failures
Trade-offs: โ Choose based on your system goals
MICROSERVICES VS MONOLITH
MONOLITH โ Everything in one codebase
โ Simple to start
โ Hard to scale
MICROSERVICES โ Split into small services
โ Easier to scale independently
โ More complex to manage
RELIABILITY AND FAULT TOLERANCE
Systems fail. Good design expects that.
Use: โ Redundancy (multiple servers)
โ Failover systems
โ Monitoring and alerts
Goal: โ System should keep running even when parts fail
LATENCY AND PERFORMANCE
Latency = time taken to respond
Improve performance by: โ Using caching
โ Reducing database queries
โ Using CDNs
โ Optimizing code
REAL-WORLD THINKING
When designing systems, always ask:
โ What happens when traffic spikes
โ What happens if a server crashes
โ How fast is the response
โ How secure is the system
System design is about thinking ahead.
HOW TO START PRACTICING
Pick simple systems and design them:
โ URL Shortener (like https://t.co/8yL8jJoWz8)
โ Chat System (like WhatsApp)
โ File Storage (like Google Drive)
โ News Feed (like Twitter)
Break them down step by step.
FINAL MINDSET
System design is not memorizing answers.
It is: โ Understanding trade-offs
โ Making smart decisions
โ Thinking at scale
โ Designing for failure
Grab the System Design Handbook here:
https://t.co/WIMretQFPE
MALAYSIA PERKENALKAN DIESEL DARI KELAPA SAWIT
FELDA memperkenalkan minyak alternatif bernama B100 susulan krisis bekalan minyak ketika ini
Minyak itu sepenuhnya daripada kelapa sawit dan merupakan minyak biodiesel pertama di dunia tidak menggunakan elemen minyak fosil
Harga minyak B100 ini dianggarkan RM 4.40 seliter dan lebih murah dari harga diesel ketika ini sekitar RM 6.02 seliter. Pengeluaran Kelapa Sawit sebanyak 20 Juta Tan setahun membolehkan bekalan B100 diberikan cukup untuk keperluan Diesel rakyat Malaysia dari segi teorinya
Namun cabaran utama minyak ini ialah kapasiti pengeluaran yang tidak sebanyak minyak diesel dan permintaan yang rendah
FELDA mencadangkan agar Kerajaan mula memperkenalkan minyak ini di semua stesen minyak dan FELDA sendiri akan mula mengoperasikan minyak ini di semua kilangnya dan elemen logistiknya selepas selesai ujian selama 15 bulan dan 15,000 km perjalanan