-
Loadbalancer
-
Caching
-
Database
-
RDBMS design and working
-
Indexes
- How indexing works in RDBMS?
-
ACID vs BASE
-
Partitioning and Sharding Data
- Consistent Hashing
- Strong vs Eventual consistency
-
CAP Theorem
-
RDBMS vs NoSql
- Types of NoSQL
- Key/Value
- Wide column
- Document based
- Graph based
- Types of NoSQL
-
How internet works?
Load balancer at Networking Layer L4 Load balance on the packets which you are receiving.
- Looks at the IP address and port number and makes the decision on that.
- Depending on the algorithm that is defined in the load-balancer software.
- Changes the target IP address in the request using Network address translation which happens using the table.
- Also incoming IP address is also changed before forwarding to server underneath load-balancer so that server can connect back with the load-balancer
Pros
- Simple load balancing
- Efficient
- More secure ( no need to look into the data )
- One TCP connection
- Network Address Translation
Cons
- No smart load balancing
- NA microservices
- Sticky per segment
- No caching
I cant look at the data so cant cache the data
Eg. LB has IP address and port mapping table, fwd it to corresponding IP:port
Load balancer at Application Layer L7 Request is checked against the rules. Modifies the content and replaces the IP address. Can look into the data.
Pros -
- Smart load balancing
- Caching
- Great for microservices
Cons
- Expensive (looks at data)
- Decrypts (terminates TLS)
- Two TCP connection
Load balance on http header, decision based on http-header
-
Hardware Load balancer
- Expensive and only giant tech companies uses them
-
Software Load balancer
- Algo -
- Round robin
- Round Robin with weighted server
- Least Connections
- Least Response Time
- Source IP hash
- URL hash
- Algo -
- Host based
- Path based
- Header based
Reference and credits
https://landing.google.com/sre/books/ https://systemdesignmanual.com