Failover server types

Cold standby (Periodically Database backup and when database is not available. Manually activate standby database. Chances you will loose some data.)
Warm standby (Automatically data get replicated to other database and once DB is not available backup DB is on.)
Hot standby (Instead of keeping backup DB. Your webserver will write to 2 different database. SO one DB not available then other DB will be there.)



Sequence Diagram - For new service

Topics
Partition
CAP
Rack awareness

Broker/Server/Machine -> Have queues

Hash Table
- A Hash function quickly maps some key to a bucket
- That bucket is then searched for the keys value
- Hash collisions occur when more than one key maps to the same bucket
- Insert/lookup/delete are O(1) and worst O(n)
- Hash table used for fast lookup


Graph
- O(V+E)
- Access using BFS & DFS

Search and Information Retrieval
- Start with forward index of keywords in each document
- Document ID 123 - the, quick, red, fox

- Then generate an inverted index that maps keywords to documents.

IF-IDF: Document Search
Stands for Term Frequency & Inverse Document Frequency

Page Rank


For Decoupling/Scaling tool
Pub/Sub
AWS SQS

Apache Spark
Process large amount of data

MapReduce Spark
YARN
HDFS

MapReduce - What data you need. that will be extracted.

Batch processing
Interactive queries (Spark SQL)
Real time analytics
Machine Learning MLLib
Graph processing
Spark streaming

Not for Online Transaction Processing

Mainely use for Processing/Transforming/Streaming


System design principles are essential guidelines that help in creating efficient, scalable, and maintainable systems. Here are some key principles:

Abstraction: Simplifying complex systems by breaking them down into more manageable components.
Modularity: Dividing a system into smaller, self-contained modules that can be developed, tested, and maintained independently.
Encapsulation: Hiding the internal details of modules and exposing only the necessary interfaces.
Separation of Concerns: Dividing a system into distinct sections, each addressing a specific concern or functionality.
Single Responsibility Principle: Ensuring that each module or component has only one reason to change, focusing on a single responsibility.
Scalability: Designing systems that can handle increased loads by adding resources.
Reliability: Building systems that can recover from failures and continue to operate correctly.
Maintainability: Creating systems that are easy to understand, modify, and extend.
Performance: Optimizing systems to perform efficiently under expected workloads.
Security: Protecting systems from unauthorized access and ensuring data integrity and confidentiality.


- Design a parking lot (https://lnkd.in/dBSdy7qx) 
- Design an event booking platform - (https://lnkd.in/dDtjrTKS)
- Design Splitwise (https://lnkd.in/dNxFVxYK)
- Design Chess (https://lnkd.in/dT3z-RvY)
- Design a chat application (https://lnkd.in/dGRn8NpV)
- Design UPI (https://lnkd.in/dYjsXe6T)
