Log
A file where a program writes down what's happening, with the time, so it can be checked later.
Example
'10:42:03 request /api/users took 1,800 ms': a log line showing a slow query.
Lessons that use it
Kinds of load balancers
Not all load balancers are alike
Clusters
Many machines, one system
Cache
What's asked often, close at hand
Proxies
A middleman in between
Storage types
Where data lives
What is an algorithm
You already use algorithms
Big O notation
How much does it grow?
Measuring efficiency
Fast and light on memory
Time complexity
Count steps, not seconds
Space complexity
How much memory it asks for
Dynamic lists
An array that grows by itself
Hash tables
From key to slot in 1 calculation
Hash collisions
When 2 keys want the same spot
Hash algorithms
A good hash spreads evenly
Binary trees
Each node, at most 2 children
Trees in an array
No references, just math
Binary search trees
Smaller on the left, larger on the right
AVL trees
A tree that straightens itself
Heaps
The smallest, always on top
Building a heap
Bottom-up is cheaper
The k largest
Keep the best without sorting everything
Binary search in depth
2 pointers closing in
Boundaries with binary search
Where to insert and where a run starts
Searching with a hash
From O(n²) to O(n) with a table
Choosing how to search
Brute force or using the order
What makes a good sort
5 things you ask of it
Selection sort
Picking the smallest, over and over
Insertion sort
Like arranging the cards in your hand
Quick sort
A pivot and 2 sides
Merge sort
Split in half and merge in order
Heap sort
Take the maximum and leave it at the end
Bucket sort
Split into buckets and sort each one
Radix sort
Digit by digit
Divide and conquer
Split, solve and combine
Fractional knapsack
Most value per kilo
Maximum product cutting
Cut into threes
NoSQL databases
Beyond tables
SQL or NoSQL
Picking the right database
Sagas
Steps that can be undone
Event-driven architecture
Announcing what happened
API Gateway
1 single front door
OAuth 2.0 and OpenID Connect
Grant access without giving the password
Single Sign-On
One login for everything
SSL, TLS and mTLS
Talk without anyone listening
Designing Uber
10 million rides a day
