Showing posts with label Architecture. Show all posts
Showing posts with label Architecture. Show all posts

26 August 2026

#System design


Key Concepts


S.No Topic Sub-Topics
1 System Design  Functional vs Non-Functional Requirements, Scalability, Availability & Reliability, Latency & Throughput, CAP Theorem, Consistency Models, Trade-offs
2 Requirements & Capacity Estimation Functional Requirements, Non-Functional Requirements, QPS Estimation, Storage Estimation, Bandwidth Estimation, Traffic Estimation, Back-of-the-Envelope Calculations
3 API & Interface Design REST APIs, gRPC, API Versioning, Idempotency, Authentication & Authorization, Rate Limiting, Request Validation
4 Networking HTTP/HTTPS, DNS, TCP/IP, Load Balancers, CDN, Firewall & NAT, Timeouts & Keep-Alive
5 High-Level Design (HLD) Component Diagram, Data Flow Diagram, Service Boundaries, Microservices, Database Selection, Scalability, Bottleneck Identification
6 Low-Level Design (LLD) SOLID Principles, Design Patterns, Class Diagrams, Sequence Diagrams, Object-Oriented Design, API & Component Design, Extensibility
7 Databases SQL vs NoSQL, Indexing, Normalization, Sharding, Replication, Partitioning, ACID vs BASE
8 Caching Why Caching, Cache-Aside, Write-Through, Write-Behind, TTL, LRU/LFU, Cache Invalidation
9 Scalability Vertical vs Horizontal Scaling, Auto Scaling, Stateless Services, Service Discovery, Load Balancing, Database Scaling, Partitioning
10 Storage Systems Object Storage, Block Storage, File Storage, Data Lakes, Log Aggregation, Backup & Recovery, Hot vs Cold Storage
11 Distributed Systems Consistency Models, Strong vs Eventual Consistency, Distributed Transactions, 2PC/3PC, Saga Pattern, Consensus, Leader Election
12 Messaging & Event-Driven Systems Kafka, RabbitMQ, SQS, Pub/Sub, Event Streaming, Sync vs Async Communication, Delivery Semantics
13 Fault Tolerance & Resilience Retry, Timeout, Circuit Breaker, Bulkhead, Rate Limiting, Failover, Graceful Degradation
14 Security OAuth 2.0, JWT, RBAC/ACL, TLS/SSL, Encryption at Rest & In Transit, Secrets Management, OWASP Basics
15 Observability Logging, Metrics, Distributed Tracing, Monitoring, Alerting, SLI/SLO/SLA, Dashboards
16 DevOps & Deployment CI/CD, Docker, Kubernetes, Blue-Green Deployment, Canary Deployment, Infrastructure as Code, GitOps
17 Social Media System Design Feed Generation, Fan-out, Timeline Service, Follow Graph, Caching, Sharding, Real-time Notifications
18 E-Commerce System Design Product Catalog, Cart, Order Service, Inventory, Payment, Search, Event-Driven Architecture
19 Ride-Hailing System Design Geospatial Queries, Location Tracking, Driver Matching, Trip Management, Real-time Events, Surge Pricing, Scalability
20 Video Streaming System Design Video Upload, Transcoding, Object Storage, CDN, Metadata, Streaming, Content Delivery
21 Banking & Payment System Design Payment Gateway, Transaction Processing, Ledger, Idempotency, Fraud Detection, Distributed Transactions, Disaster Recovery

16 September 2025

#Microservice


Key Concepts


# Microservices Concept Description Pattern
1 Microservice Small, independently deployable business service Decomposition Pattern
2 Service Decomposition Break application into smaller business services Decompose by Business Capability
3 API Gateway Single entry point for client requests API Gateway Pattern
4 Service Discovery Dynamically finds available service instances Service Discovery Pattern
5 Load Balancing Distributes requests across service instances Load Balancer Pattern
6 Service Communication Enables communication between services Remote Procedure Call Pattern
7 Asynchronous Communication Services communicate without waiting for response Messaging Pattern
8 Event-Driven Architecture Services communicate through business events Event-Driven Pattern
9 Database per Service Each service owns its data Database-per-Service Pattern
10 Shared Database Multiple services share a database Shared Database Pattern
11 Distributed Transaction Transaction spans multiple services Distributed Transaction Pattern
12 Saga Manages transactions across multiple services Saga Pattern
13 Saga Choreography Services coordinate through events Choreography Pattern
14 Saga Orchestration Central coordinator manages the workflow Orchestration Pattern
15 Circuit Breaker Prevents repeated calls to failing services Circuit Breaker Pattern
16 Retry Reattempts failed operations Retry Pattern
17 Timeout Stops calls that take too long Timeout Pattern
18 Bulkhead Isolates failures between services Bulkhead Pattern
19 Fallback Provides alternative behavior when a service fails Fallback Pattern
20 Rate Limiting Controls the number of incoming requests Rate Limiting Pattern
21 Caching Stores frequently accessed data for faster retrieval Cache-Aside Pattern
22 CQRS Separates read and write operations CQRS Pattern
23 Event Sourcing Stores state changes as a sequence of events Event Sourcing Pattern
24 Idempotency Ensures repeated requests don't create duplicate effects Idempotency Pattern
25 Strangler Fig Gradually replaces a legacy application Strangler Fig Pattern
26 Anti-Corruption Layer Protects a new service from legacy models Anti-Corruption Layer Pattern
27 Backend for Frontend Provides a dedicated backend for each client BFF Pattern
28 Aggregator Combines responses from multiple services Aggregator Pattern
29 Adapter Converts one interface into another Adapter Pattern
30 Sidecar Runs supporting functionality alongside a service Sidecar Pattern
31 Service Mesh Manages service-to-service communication Service Mesh Pattern
32 Ambassador Handles external communication through a proxy Ambassador Pattern
33 Externalized Configuration Keeps configuration outside application code External Configuration Pattern
34 Centralized Configuration Provides configuration from a central location Configuration Server Pattern
35 Health Check Determines whether a service is operational Health Check Pattern
36 Distributed Tracing Tracks requests across multiple services Distributed Tracing Pattern
37 Centralized Logging Collects logs from multiple services Centralized Logging Pattern
38 Observability Provides visibility into distributed system behavior Observability Pattern
39 Contract Testing Validates compatibility between service consumers and providers Consumer-Driven Contract Pattern
40 API Versioning Allows APIs to evolve without breaking clients API Versioning Pattern
41 Authentication Verifies the identity of users or services Authentication Pattern
42 Authorization Controls access to resources Authorization Pattern
43 Token Propagation Passes user/service identity between services Token Propagation Pattern
44 Zero Trust Services are not automatically trusted Zero Trust Pattern
45 Blue-Green Deployment Uses two environments for safer releases Blue-Green Pattern
46 Canary Deployment Releases changes gradually Canary Release Pattern
47 Rolling Deployment Gradually replaces old service instances Rolling Update Pattern
48 Horizontal Scaling Adds additional service instances Scale-Out Pattern
49 Fault Isolation Prevents one service failure from spreading Failure Isolation Pattern
50 Independent Deployment Allows services to be deployed separately Independent Deployment Pattern

Interview question

What are Microservices, and how do they differ from Monolithic architecture?
Why are Microservices important for AI and Agentic AI platforms?
What are the core principles of Microservices architecture?
What are the advantages and disadvantages of Microservices?
How do you identify service boundaries in a Microservices architecture?
What is Domain-Driven Design (DDD), and how does it help Microservices?
What is a bounded context in Microservices?
How do you decompose a monolithic application into Microservices?
What are the common communication patterns between Microservices?
How do synchronous and asynchronous communication differ in Microservices?
What is REST-based communication in Microservices?
What is gRPC, and when would you use it in Microservices?
What is event-driven architecture in Microservices?
How do Kafka and Microservices work together in AI systems?
What is an API Gateway, and why is it needed in Microservices?
How do API Gateways support AI and LLM-based applications?
What is service discovery, and how does it work?
How do Eureka, Consul, and Kubernetes Service Discovery differ?
What is client-side vs server-side service discovery?
How do Microservices handle dynamic scaling?
What is centralized configuration management in Microservices?
How does Spring Cloud Config help Microservices?
What is distributed tracing, and why is it important?
How do OpenTelemetry and Zipkin help Microservices observability?
What metrics should be monitored in Microservices?
How do logs, metrics, and traces work together?
What is the role of Prometheus and Grafana in Microservices?
How do you monitor AI service latency in Microservices?
What is resiliency in Microservices?
How do Circuit Breakers work in Microservices?
How does Resilience4j improve fault tolerance?
What are retries, bulkheads, and rate limiters?
How do you prevent cascading failures in Microservices?
How do you design highly available Microservices?
What is eventual consistency in Microservices?
How do SAGA patterns work in distributed transactions?
What is choreography vs orchestration in SAGA?
How do Microservices manage distributed data?
Why should each Microservice own its database?
How do you implement CQRS in Microservices?
What is Event Sourcing, and when should it be used?
How do Microservices support AI data pipelines?
How do Microservices integrate with Vector Databases?
How do Microservices integrate with RAG architectures?
What is an AI Gateway in an LLM platform?
How do you design a Chatbot using Microservices?
How do you design an Agentic AI platform using Microservices?
What Microservices are typically required in an AI platform?
How do Prompt Services fit into a Microservices architecture?
How do Memory Services fit into an Agentic AI architecture?
How do Tool Services fit into Agentic AI platforms?
How do RAG Services fit into AI architectures?
How do Model Routing Services work in AI platforms?
How do Guardrail Services improve AI safety?
How do Evaluation Services measure AI quality?
How do AI Observability Services work?
How do Microservices integrate with OpenAI APIs?
How do Microservices integrate with Azure OpenAI?
How do you manage multiple LLM providers in Microservices?
How do you implement model fallback strategies?
How do you implement AI cost optimization in Microservices?
How do you track token consumption across services?
How do Redis and Microservices work together?
How does Elasticsearch support Microservices?
How does PostgreSQL support Microservices?
How do MongoDB and Microservices work together?
How do Docker and Microservices work together?
How does Kubernetes manage Microservices?
What are Kubernetes Deployments, Services, and Ingress?
How does Horizontal Pod Autoscaling work?
How do Microservices support multi-region deployments?
How do you secure Microservices using OAuth2?
How do JWT tokens work in Microservices?
How do API Gateways enforce security?
How do you implement zero-trust security in Microservices?
How do service-to-service authentication mechanisms work?
How do you secure AI tools exposed through Microservices?
How do you prevent prompt injection from propagating across services?
How do you protect sensitive data in AI Microservices?
How do you implement PII masking across Microservices?
How do you test Microservices independently?
How do contract tests work in Microservices?
How do integration tests work across Microservices?
How do you mock dependent services during testing?
How do you perform performance testing in Microservices?
How do you perform chaos engineering in Microservices?
How do CI/CD pipelines support Microservices?
How do GitOps practices improve Microservices deployments?
How do Blue-Green deployments work?
How do Canary deployments work?
How do Feature Flags help Microservices releases?
How do you troubleshoot production issues in Microservices?
How do you optimize latency in distributed Microservices?
How do you handle high-throughput event processing?
How do you design a scalable enterprise AI platform using Microservices?
How would you design a production-grade RAG platform using Microservices?
How would you design a multi-agent AI platform using Microservices?
How would you design a global-scale AI and LLM platform using Microservices?

Related Topics


03 September 2025

#DSA

#DSA

Key Concepts


S.No Topic Sub-Topics
1Introduction & ComplexityWhat is DSA, Time Complexity (Big-O), Space Complexity, Best/Average/Worst case, Simple examples
2Arrays BasicsDeclaration & Access, Common operations, Two-pointer technique, Sliding window intro, In-place vs extra space
3Arrays ProblemsSubarray sum, Prefix sums, Kadane's algorithm, Rearrange problems, Dutch National Flag
4Strings BasicsImmutability, Common operations, Character arrays, String builders, Unicode & encodings
5Strings AlgorithmsPattern search (KMP), Rabin-Karp, Anagrams, Palindromes, Trie intro
6Linked ListsSingly vs Doubly, Operations (insert/delete), Reverse list, Fast/Slow pointers, Detect cycle
7Stacks & QueuesLIFO vs FIFO, Implementation using arrays/linked list, Monotonic stack, Circular queue, Applications
8Recursion & BacktrackingRecurrence relations, Call stack, Backtracking patterns, Subset/permutation generation, N-Queens
9Sorting AlgorithmsBubble, Selection, Insertion, Merge sort, Quick sort
10Searching AlgorithmsLinear search, Binary search, Binary search on answer, Search in rotated array, Interpolation search
11Hashing & Hash TablesHash functions, Collision resolution, HashMap/HashSet, Frequency maps, Anagram/counting problems
12Priority Queue & HeapsBinary heap, Insert/extract, Heapify, Kth largest, Heap for merge/k-way
13Trees BasicsBinary tree, Tree traversal (pre/in/post), Height/depth, Recursive vs iterative, Tree representations
14Binary Search Tree (BST)BST properties, Insert/Delete/Search, Lowest common ancestor, Range queries, Balanced vs unbalanced
15Tries (Prefix Trees)Insert/Search, Prefix queries, Autocomplete, Word dictionary, Memory considerations
16Graphs BasicsDirected vs undirected, Adjacency list/matrix, Graph traversal, Connected components, Dense vs sparse
17Graph TraversalBFS, DFS, Tree vs graph traversal, Level order, Parent/Distance tracking
18Shortest Path AlgorithmsDijkstra, Bellman-Ford, SPFA, Weighted vs unweighted, Single-source vs all-pairs
19Minimum Spanning TreeKruskal, Prim, Union-Find intro, Cycle detection, Applications
20Union-Find / Disjoint SetMake/Find/Union, Path compression, Union by rank, Connected components, Offline queries
21Dynamic ProgrammingOverlapping subproblems, Optimal substructure, Memoization vs tabulation, State definition, Simple examples
22Common DP Patterns0/1 Knapsack, Unbounded knapsack, Longest Increasing Subsequence, Longest Common Subsequence, DP on strings
23Advanced DPBitmask DP, DP on trees, Digit DP, Convex hull trick intro, Optimization techniques
24Greedy AlgorithmsGreedy choice property, Activity selection, Huffman coding, Fractional knapsack, Interval scheduling
25Bit ManipulationBit ops (&,|,^,~,<<,>>), Count bits, Lowbit, Bitmask tricks, XOR properties
26Sliding Window & Two PointersFixed window, Variable window, Two-pointer for pairs, Subarray problems, Window optimization
27Prefix/Suffix & Difference ArraysPrefix sums, Suffix sums, Prefix max/min, Range update via diff array, Prefix product
28Segment Tree & Fenwick TreePoint update & range query, Range update & point query, Lazy propagation, Fenwick implementation, Use-cases
29Advanced Graphs & FlowsTopological sort, DAG applications, Max flow (Edmonds-Karp), Min-cut, Matching basics
30Interview Prep & PracticeCommon patterns, Problem-solving checklist, Mock interviews, Platforms (LeetCode, Codeforces), Time-boxed practice

Interview question

Basic Level

  1. What is an algorithm?
  2. Explain Time Complexity and Big-O notation.
  3. What is Space Complexity?
  4. What is an Array?
  5. Difference between Array and Linked List?
  6. What is a Linked List? Types?
  7. What is a Stack? Explain operations.
  8. What is a Queue? Explain types.
  9. Explain postfix, prefix, infix notations.
  10. What is a Hash table?
  11. What is a Tree data structure?
  12. Difference between Binary Tree and Binary Search Tree (BST)?
  13. What is a Graph?
  14. Difference between DFS and BFS.
  15. What is Recursion?
  16. What is Divide and Conquer approach?
  17. Explain Bubble Sort algorithm.
  18. Explain Selection Sort algorithm.
  19. Explain Insertion Sort algorithm.
  20. What is Linear Search?
  21. What is Binary Search?
  22. What is Dynamic Programming (basic definition)?
  23. What is Greedy Algorithm?
  24. What is a Heap?
  25. What is a Hash collision?

Intermediate Level

  1. Explain Merge Sort algorithm and its complexity.
  2. Explain Quick Sort and its complexity.
  3. Explain Two-pointer technique with examples.
  4. Explain Sliding Window technique.
  5. What is Prefix Sum and where is it used?
  6. Explain Kadane?s algorithm.
  7. What is a Circular Linked List?
  8. How do you detect a cycle in a Linked List?
  9. What is a Doubly Linked List?
  10. What is a Priority Queue?
  11. How do you implement a Queue using Stacks?
  12. How do you implement a Stack using Queues?
  13. What is a Trie data structure?
  14. Difference between Tree and Graph.
  15. What is a Balanced Binary Tree?
  16. What is AVL Tree?
  17. What is Red-Black Tree?
  18. Explain Dijkstra?s algorithm.
  19. What is Bellman-Ford algorithm?
  20. Explain Floyd-Warshall algorithm.
  21. What is Kruskal?s algorithm?
  22. What is Prim?s algorithm?
  23. What is Union-Find data structure?
  24. What is Topological Sorting?
  25. What is Backtracking? Give example.

Advanced Level

  1. Explain Segment Tree and its operations.
  2. What is a Fenwick Tree (Binary Indexed Tree)?
  3. Difference between Segment Tree and Fenwick Tree.
  4. Solve: Maximum product subarray.
  5. Solve: Longest increasing subsequence.
  6. Explain Longest Common Subsequence.
  7. What is KMP algorithm?
  8. Explain Rabin-Karp algorithm.
  9. Explain the concept of rolling hash.
  10. What is a Min-Cut and Max-Flow problem?
  11. Explain Edmonds-Karp Algorithm.
  12. Explain Kahn?s algorithm.
  13. Explain A* search algorithm.
  14. What is NP, NP-hard, and NP-complete?
  15. Explain Traveling Salesman Problem.
  16. Explain Bitmask DP with example.
  17. Explain DP on trees.
  18. Explain DP on graphs.
  19. How does binary lifting work?
  20. What is a Sparse Table?
  21. Explain Lowest Common Ancestor problem.
  22. Implement LRU Cache logic.
  23. What is a Bloom Filter?
  24. Explain Consistent Hashing.
  25. Explain Suffix array and Suffix tree.

Expert Level

  1. Solve: Maximum subarray sum for circular array.
  2. Solve: Median of two sorted arrays (log approach).
  3. Solve: Find Kth smallest element in sorted matrix.
  4. Solve: Word ladder shortest path.
  5. Solve: N-Queens problem optimized solution.
  6. Solve: Shortest path in a maze using BFS.
  7. Solve: Course schedule (detect cycle in graph).
  8. Solve: Clone graph problem.
  9. Solve: Regular expression matching (DP).
  10. Solve: Edit distance problem (DP).
  11. Solve: Palindromic subsequence count (DP).
  12. Solve: Max rectangle in binary matrix.
  13. Solve: Largest histogram rectangle.
  14. Solve: Minimum window substring problem.
  15. Solve: Coin change problem variants.
  16. Solve: Sliding window maximum problem.
  17. Solve: Find bridges and articulation points.
  18. Solve: Euler path/circuit check.
  19. Solve: Detect negative cycle in graph.
  20. Solve: Longest path in DAG.
  21. Solve: Kth smallest element using order-statistic tree.
  22. Solve: Streaming median problem.
  23. Solve: Top K frequent elements problem.
  24. Solve: Find strongly connected components (Kosaraju).
  25. Solve: Implement efficient autocomplete system using Trie.

Related Topics