This exploration delves into the intricate world of system design and architecture, dissecting the fundamental principles and methodologies that underpin the creation of robust and scalable systems. From the conceptualization of software structures to the deployment of hardware components, this comprehensive study navigates through the critical decisions and considerations that engineers face when crafting efficient and reliable systems. Gain insights into best practices, design patterns, and emerging trends that shape the backbone of modern technology, empowering you to engineer solutions that stand the test of time. Whether you're a seasoned architect or an aspiring designer, embark on a journey to master the art and science of system design and architecture.
2. Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
▪ Punctuality
Join the session 5 minutes prior to the session start time. We start on
time and conclude on time!
▪ Feedback
Make sure to submit a constructive feedback for all sessions as it is
very helpful for the presenter.
▪ Silent Mode
Keep your mobile devices in silent mode, feel free to move out of
session in case you need to attend an urgent call.
▪ Avoid Disturbance
Avoid unwanted chit chat during the session.
3. Agenda
● What is System Design ?
● Scaling (Horizontal vs Vertical)
● Databases
● CAP Theorem
● Caching
● Api Gateway
● Trade Offs
5. System Design
▪ System design is the process of defining the architecture, components, modules, interfaces, and
data for a system to satisfy specified requirements.
▪ It involves translating user requirements into a detailed blueprint that guides the
implementation phase.
▪ The goal is to create a well-organized and efficient structure that meets the intended purpose
while considering factors like scalability, maintainability, and performance.
8. Horizontal vs Vertical Scaling
Horizontal Scaling
▪ When you hear the term horizontal scaling, it means is that you are planning to add an
additional separate web server(s) to distribute the load (requests).
▪ It gives you the advantage of scaling almost indefinitely but forces your application to be
stateless most of the time (as without this you are throwing some additional requirements at
your stack).
▪ This is one of the most common techniques used in cloud computing environments as setting up
multiple servers is done in no time and usually, it gives the possibility to boot up and tear down
as quickly and neatly as needed (let it be AWS Auto Scaling Group or any other tool).
▪ This approach is typically (and incorrectly actually) what people think is a scalable application.
9. Horizontal vs Vertical Scaling
Vertical Scaling
▪ Vertical scaling is the opposite (as the name suggests ;)) and relates to "boosting" web server
resources so they can withstand the additional load thrown at them.
▪ This is an especially good technique for applications that are stateful and you do not expect
more than a specific amount of traffic into them.
▪ The most common place you can see this approach is typically a master database.
▪ A database engine is usually quite limited when it comes to scalability possibilities and forces
you to boost the resources of already existing instances so database queries will resolve quickly
or may have higher throughput.
11. Database
A database is an organized collection of data stored in a computer system and usually controlled by a
database management system (DBMS). The data in common databases is modeled in tables, making
querying and processing efficient. Structured query language (SQL) is commonly used for data
querying and writing.
Data is organized into tables consisting of rows and columns and it is indexed so data can be updated,
expanded, and deleted easily. Computer databases typically contain file records data like transactions
money in one bank account to another bank account, sales and customer details, fee details of
students, and product details. There are different kinds of databases, ranging from the most prevalent
approach, the relational database, to a distributed database, cloud database, and NoSQL databases.
13. SQL vs NoSQL Database
RDBMS (SQL Based)
▪ ACID Compliance
▪ Ideal for consistent data systems
▪ Better support options
NoSQL
▪ Excellent for handling “big data”
analytics.
▪ No limits of data you can store.
▪ Easier to scale
20. Use cases of Caching Memory
▪ Mainly caching is used to speed up database applications. Here, a portion of the database is
replaced by cache and the result is removing latency which is used to come from frequently
accessing the data.
▪ These use cases are seen in case of a larger volume of accessing the data. For example: High traffic
dynamic websites.
▪ Another use case can be an acceleration of query. Here, the cache is used for storing the result of a
complex query. Queries such as the order and grouping take a considerable time for execution. If
executing the queries is repeated then using cache for storing the result gives a higher response.
21. Types of Caching
● Database Caching
● Memory Caching
● Web Caching
○ Web client caching
○ Web server caching
● CDN Caching
23. Api Gateway
API gateway is like a virtual passage placed assuredly between an API and its various backend
services. It takes care of invites or requests, matching them to the suitable stations or services for
request /call processing, and sends them back to the target resource.
APIs for enterprises and data-driven organizations need an added layer of safety, access monitoring,
and usage limiting. A gateway attains the goal, as it takes care of request rate limitation, data usage,
request source validation, and access/user authentication.
24. Why to use Api Gateway
● Its features like authentication and rate-limiting help developers examine API abuse and overuse.
● Its inclusion permits developers to find out how APIs are used in different scenarios.
● For monetized solutions, it constructs a seamless relationship between backend processes and billing
systems.
● It can concoct the specific requests for assorted applications if microservices deployment is concerned.
● It assists in obtaining all the needed resources for API maintenance, upgrades, and modernization, even
when updates are happening.
● Multiple API handling is easy with API gateway as it will observe everything occurring to API.
25. How does Api Gateway works ?
▪ Application testing and usage involve tons of data exchange operations. Such type of communication
requires advanced arrangements. To sort the issue, the API gateway turns into a central platform for
receiving assorted API requests.
▪ During the process, several API calls are clubbed, authenticated, and redirected to suitable APIs.
▪ In the microservices ecosystem, it formulates an opportune entrance for requests by specific
microservices. It also establishes accessibility and conducting criteria.
▪ Besides, API gateways handle employment like service discovery, API protocol translation, business
logic processing, cache management, network traffic assistance, and API monitoring.