We can’t survive Backend if you don’t know these concepts
Here’s a clean short description cheat sheet for all 5 backend concepts
#1 Authentication & Authorization
- Authentication – Verifies who the user is (login).
- Authorization – Decides what the user can access.
- Real-world example – Login (auth) + access control (authorization).
- Login methods – JWT (token), Session (server-based), OAuth (third-party login).
- Roles & Permissions – Define user access levels (admin, user, etc.).
- Middleware protection – Secures routes before request reaches logic.
#2 Caching Strategies
- Cache Aside – App checks cache first, then DB if needed.
- Write Through – Data written to cache and DB together.
- Write Back – Cache updated first, DB updated later.
- Read Through – Cache handles fetching data automatically.
#3 API Design & Rate Limiting
- REST vs GraphQL – REST = multiple endpoints, GraphQL = flexible queries.
- Designing APIs – Structure endpoints clearly and consistently.
- HTTP Methods & Status Codes – GET, POST, PUT, DELETE + 200, 404, etc.
- Rate Limiting – Restricts number of requests per user.
- Implementing Limits – Use tools/middleware to control traffic.
- Common Solutions – Token bucket, fixed window, sliding window.
#4 Load Balancing & Scaling
- Load Balancing – Distributes traffic across servers.
- Horizontal vs Vertical Scaling – More machines vs stronger machine.
- Algorithms – Round Robin, Least Connections, IP Hash.
- DNS-based Balancing – Uses DNS to distribute traffic globally.
- Health Checks – Detects and removes unhealthy servers.
- Balancer Config – Setup rules for traffic routing.
#5 Environment & Secret Management
- .env files – Store sensitive configs separately.
- Environment Variables – Runtime config values for apps.
- Secret Management Tools – Secure storage for secrets (Vault, AWS).
- Using .env in Code – Load env variables via libraries.
- Local vs Production Secrets – Different configs for different environments.
- Best Practices – Don’t expose secrets, use encryption & access control.