0% found this document useful (0 votes)
4 views

Syst & DB

Uploaded by

rayudu.gouda2015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Syst & DB

Uploaded by

rayudu.gouda2015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

System Design(https://www.geeksforgeeks.

org/system-
design-tutorial/?ref=lbp)

System Design is the process of designing the architecture, components, and interfaces for a system so that it
meets the end-user requirements

Steps for approaching this system design tutorial


1. Understand the requirements: Before starting the design process, it is
important to understand the requirements and constraints of the system.
This includes gathering information about the problem space,
performance requirements, scalability needs, and security concerns.
2. Identify the major components: Identify the major components of the
system and how they interact with each other. This includes determining
the relationships between different components and how they contribute
to the overall functionality of the system.
3. Choose appropriate technology: Based on the requirements and
components, choose the appropriate technology to implement the system.
This may involve choosing hardware and software platforms, databases,
programming languages, and tools.
4. Define the interface: Define the interface between different components
of the system, including APIs, protocols, and data formats.
5. Design the data model: Design the data model for the system, including
the schema for the database, the structure of data files, and the data flow
between components.
6. Consider scalability and performance: Consider scalability and
performance implications of the design, including factors such as load
balancing, caching, and database optimization.
7. Test and validate the design: Validate the design by testing the system
with realistic data and use cases, and make changes as needed to
address any issues that arise.
8. Deploy and maintain the system: Finally, deploy the system and
maintain it over time, including fixing bugs, updating components, and
adding new features as needed.

Hotel booking system design

https://www.youtube.com/watch?v=kO0EQNfE2x4
Which databases to use?
-relational database management system-MySQL, Oracle database, PostgreSQL
-Non-Relational databases are also called NoSQL databases. Popular ones are -CouchDB,Neo4j,
Cassandra, HBase, Amazon DynamoDB,
-These databases are grouped into four categories: key-value stores, graph stores, column stores,
and document stores. Join operations are generally not supported in non-relational databases.

Non-relational databases might be the right choice:


>Your application requires super-low latency.
> Your data are unstructured, or you do not have any relational data.
> You only need to serialize and deserialize data (JSON, XML, YAML, etc.).
> You need to store a massive amount of data.

Vertical scaling vs horizontal scaling


Vertical scaling, referred to as “scale up”, means the process of adding more power (CPU,RAM,
etc.) to your servers. Horizontal scaling, referred to as “scale-out”, allows you to scale by adding
more servers into your pool of resources

-When traffic is low, vertical scaling is a great option


-Vertical scaling has a hard limit. It is impossible to add unlimited CPU and memory to a
single server.
- Vertical scaling does not have failover and redundancy. If one server goes down, the
website/app goes down with it completely.
Cache
A cache is a temporary storage area that stores the result of expensive responses or frequently
accessed data in memory so that subsequent requests are served more quickly.
• Better performance:
• Reliability
• High availability
Cache
A cache is a temporary storage area that stores the result of expensive responses or frequently
accessed data in memory so that subsequent requests are served more quickly.

Considerations for using cache


>Consider using cache when data is read frequently but modified infrequently.
> Expiration policy. It is a good practice to implement an expiration policy. Once cached
data is expired, it is removed from the cache.
> Consistency: This involves keeping the data store and the cache in sync
> • Eviction Policy: Once the cache is full, any requests to add items to the cache might
cause existing items to be removed. This is called cache eviction. Least-recently-used
(LRU) is the most popular cache eviction policy.

Content delivery network (CDN)


A CDN is a network of geographically dispersed servers used to deliver static content. CDN
servers cache static content like images, videos, CSS, JavaScript files, etc.
Logging: Monitoring error logs is important because it helps to identify errors and problemsin
the system. You can monitor error logs at per server level or use tools to aggregate them toa
centralized service for easy search and viewing.
Metrics: Collecting different types of metrics help us to gain business insights and understand
the health status of the system. Some of the following metrics are useful:
• Host level metrics: CPU, Memory, disk I/O, etc.
• Aggregated level metrics: for example, the performance of the entire database tier, cache tier,
etc.
• Key business metrics: daily active users, retention, revenue, etc.
Automation: When a system gets big and complex, we need to build or leverage automation
tools to improve productivity. Continuous integration is a good practice, in which each code
check-in is verified through automation, allowing teams to detect problems early.
Besides,automating your build, test, deploy process, etc. could improve developer productivity
significantly.
https://www.youtube.com/watch?v=KjM1kWCGef8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy