Poll & Push Strategy: Poll means when client request server for updates (long polling / short polling) . Push means when server sends messages to client (SSE (Server-Sent Events) , WS (Web Sockets) ) .
short polling: short polling is when client periodically sents request to server for updates
Long Polling: It is a technique in which clients http request is held by server until new data becomes available.
Vertical Scaling: Vertical scaling means adding more resources (CPU, RAM, storage, etc.) to a single server or machine to handle increased load.
Example
- We start with a server that has 2 CPUs & 4 GB RAM.
- When traffic grows, instead of adding more servers, we upgrade it to 8 CPUs & 32 GB RAM.
- Same machine, just more powerful.
Horizontal Scaling: Horizontal scaling means adding more servers/machines to our system and distributing the load among them. Instead of making one server stronger (vertical scaling), we add more servers.
Load Balancer: A load balancer is a service which distributes incoming traffic across multiple servers to prevent any single server from becoming overloaded
Cache eviction policies: It is a set of rule that decides which data to remove when cache is full. As cache storage is small we can't keep everything we want .
Proxy: proxy or a forward proxy stays in front of client. when we request a website it goes through proxy first. The proxy then asks the website for data on behalf.
Reverse Proxy: reverse proxy stays in front of our web server. when we visit a site we are not talking to actual database server, we are talking to a reverse proxy that decides which backend server should handle our request
Websocket: Websocket provides bidirectional connection between client & server over single TCP connection.
TCP (Transmission Control Protocol) is way for two devices on a network to talk to each other
In traditional http connction when we sent a request to the server , server reads it and sends back response. After response is delivered the connection gets closed. But in websocket connection we send request to server only once . As long as the line is open both client & server can talk to each other .
Api Gateway: Api gateway is a single entry point that sits between client and backend services.
Idempotency: It means performing the same operation multiple times gives the same result as doing it once.
In API HTTP explicitly defines which methods should be idempotent. For example, GET requests are designed not to modify server state, making them naturally idempotent, no matter how many times we send the same request, the outcome remains the same. That’s why we can refresh a webpage repeatedly without causing unintended side effects.










Top comments (0)