How Service Discovery Works in Kubernetes ?
In Kubernetes, service discovery is the mechanism that allows pods to find and communicate with other applications without needing to know their IP addresses. The Problem Pods are ephemeral: If applications connected directly to pod IPs, communication…
Which design patterns are most heavily used in Spring?
A strong answer is: How does Spring use design patterns Internally? 1. Singleton Pattern — How Spring Actually Uses It What developers see @Servicepublic class UserService {} @Autowiredprivate UserService userService; Every injection gets the same…
How Hashmap stores values ? What is hash collision ? How store values in case of hash collision in Java ?
1. Internal Structure A HashMap internally maintains an array of buckets. Suppose capacity = 16. 2. Storing a Value Step 1: Calculate hash Java actually does: Let’s assume: Binary: Step 2: Find Bucket Index HashMap uses: For capacity 16: Binary:…
Hardware vs Software
Hardware and Software are the two main components of a computer system. Hardware Software Physical parts of a computer that you can touch. Programs and instructions that tell the hardware what to do. Tangible (has physical form). Intangible (cannot be…
What is D-DOS attack ?
A DDoS attack stands for Distributed Denial of Service attack. It is a cyberattack where an attacker uses many computers, servers, or internet-connected devices (often a “botnet” of compromised devices) to overwhelm a target system with…
How to design a Recommendation System- use ML/Machine Learning Algorithms
1. Requirements Gathering Functional Requirements We need a system that: Non-Functional Requirements Requirement Target Relevance High CTR/Conversion Latency <100ms Availability 99.9% Freshness Minutes or seconds Scalability Millions of users 2.…
Designing Netflix: Step-by-Step System Design Interview Guide
This is a classic large-scale distributed system interview problem. The goal is to design a video streaming platform that supports millions of users with high availability, low latency, and global scalability. 1. Clarify Requirements Start by asking…
You have a 10-year-old monolith. How would you start the migration into microservices architecture?
Target Architecture If you’re presenting this to architects or engineering leadership, it’s often easier to show the migration as a sequence of deployment diagrams rather than jumping directly to the target state. Stage 0 – Current State…
Explain arrays and how they work internally?
Start with a simple diagram when explaining. Assume an integer occupies 4 bytes. What is an Array? Simple Definition An array is a linear data structure that stores elements of the same data type in contiguous (continuous) memory locations. Keywords…
Web Application Architecture in AWS (Amazon)
High level architecture More detailed architecture On-Prem vs AWS Architecture Mapping Your original architecture was: AWS Equivalent Architecture Service Mapping Table On-Prem AWS Equivalent F5 ASM AWS WAF F5 LTM Application Load Balancer (ALB)…