Microservices, databases, caching, security and system architecture!
1. What is "rate limiting" in APIs?
💡 Rate limiting controls how many requests a client can make in a time window to prevent abuse and ensure fair usage.
2. What is "sharding" in databases?
💡 Sharding horizontally partitions data across multiple database instances (shards), each holding a subset of the data.
3. What is "CORS" in web development?
💡 CORS is a browser security mechanism that controls which domains can make requests to a server from a different origin.
4. What is "load balancing"?
💡 Load balancing distributes incoming requests across multiple servers to ensure no single server is overwhelmed.
5. What is a "microservices" architecture?
💡 Microservices break applications into small, independently deployable services that communicate via APIs.
6. What is "OAuth 2.0"?
💡 OAuth 2.0 lets users grant third-party applications access to their resources without sharing credentials (e.g., Sign in with Google).
7. What is "SQL injection"?
💡 SQL injection inserts malicious SQL into input fields to manipulate database queries, potentially exposing or destroying data.
8. What is a CDN (Content Delivery Network)?
💡 A CDN caches content at edge servers worldwide, reducing latency by serving users from the geographically closest server.
9. What is the purpose of "indexing" in databases?
💡 Database indexes create data structures that allow faster searching of records, trading storage space for query speed.
10. What is "horizontal scaling"?
💡 Horizontal scaling (scaling out) adds more servers to handle increased load, distributing traffic across multiple machines.
11. What is "GraphQL"?
💡 GraphQL is an API query language where clients specify exactly what data they need, reducing over-fetching and under-fetching.
12. What is the CAP theorem in distributed systems?
💡 CAP theorem states a distributed system can only guarantee two of three: Consistency, Availability, and Partition Tolerance.
13. What is "eventual consistency" in distributed systems?
💡 Eventual consistency guarantees that if no new updates are made, all replicas will eventually return the same value.
14. What is "HTTPS" and how does it differ from HTTP?
💡 HTTPS encrypts data between the browser and server using SSL/TLS, protecting against eavesdropping and man-in-the-middle attacks.
15. What is "JWT" in web security?
💡 JWT (JSON Web Token) is used for stateless authentication, encoding user claims in a signed token sent with each request.
16. What is "Docker" used for?
💡 Docker packages applications and dependencies into containers that run consistently across different environments and systems.
17. What is the difference between SQL and NoSQL databases?
💡 SQL databases use structured tables with fixed schemas. NoSQL databases offer flexible schemas in document, key-value, graph, or column formats.
18. What is "Redis" primarily used for?
💡 Redis is an in-memory key-value store used for caching, session management, real-time analytics, and pub/sub messaging.
19. What is "message queue" in system design?
💡 Message queues (like RabbitMQ, Kafka) store messages between services so they can be processed asynchronously, decoupling producers and consumers.
20. What is the difference between authentication and authorization?
💡 Authentication verifies identity (who you are). Authorization verifies permissions (what you are allowed to do).