惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Y
Y Combinator Blog
T
Tailwind CSS Blog
G
Google Developers Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 【当耐特】
腾讯CDC
T
The Blog of Author Tim Ferriss
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Foward Proxy / Reverse Proxy / SSL TLS Termination
Rohit Sharma · 2026-06-23 · via DEV Community

What is a proxy?
A proxy is an intermediary server that receives a request, forwards it elsewhere, receives the response, and sends it back.

Forward Proxy (Represents the Client)
Sits in front of client and hides the client from servers. Server cannot see the real client

 Client ---> Forward Proxy ---> Server

Imagine your company blocks access to YouTube.

Instead of

Laptop ---> youtube.com

You do

Laptop ---> Corporate Proxy ---> youtube.com

The proxy makes the request on your behalf. The server sees request coming from Proxy IP not from your laptop.

Real Example School/college proxy, Corporate internet proxy, VPNs.

When you connect to a VPN:

Your PC ---> VPN Server ---> Google

Google sees VPN IP instead of of your original IP.

Why use forward proxy?

  1. Privacy: Hides the Client IP due to which Websites can't directly identify the client.
  2. Content Filtering: companies block some websites at the office network
  3. Caching: 100 employees request same file, without proxy 100 requests would go to internet. With proxy first request would go to internet and next 99 would be server from proxy cache.

Reverse Proxy (Represents the Server)
Sits in front of server and hides the server from client. Client Cannot see the real server

Client ---> Reverse Proxy ---> Server

Suppose you have multiple servers i.e. Server 1, Server 2, Server 3 etc and you don't want clients to know about these servers. In this case we need to setup reverse proxy and, proxy decides which server gets the request.

Client
   |
   v
Reverse Proxy
   |
   +----> Server1
   |
   +----> Server2
   |
   +----> Server3

Example: When you open amazon.com your request doesn't directly hit an application server. It usually go to

Browser
   |
Load Balancer / Reverse Proxy
   |
Backend Servers

Real Example: Nginx in front of Node.js servers

Why use Reverse Proxy?

  1. Load Balancing
  2. SSL/TLS Termination: Without reverse proxy every backend server, decrypts https, with reverse proxy setted up, it handles the encryption while backend focus upon the business logic. Don't worry if SSL/TLS is not clear to you, at end of this article we have detailed explanation of SSL/TLS.
  3. Hides Internal Servers: Client never knows the servers, which eventually improves the security
  4. Caching: For expensive endpoints, Reverse proxy stores response for the future requests.

Now Let's Boost your understanding of SSL(Secure Socket Layer) and TLS(Transport layer Security):

SSL and TLS both are same terms, name SSL was used in earlier days and now its new name TLS is being used.

Detailed flow of TLS

Step 1: Browser sends a request

https://api.company.com/users

Step 2: Reverse proxy i.e. Nginx here, receives HTTPS.

Browser
   |
HTTPS
   |
Nginx

Step 3: Nginx decrypts request.

Encrypted Request
       ↓
Decrypt
       ↓
Plain HTTP Request

Step 4: Nginx forwards request.

GET /users

to backend

Browser
   |
HTTPS
   |
Nginx
   |
HTTP
   |
Node Server

Step 5: Backend processes business logic.

app.get('/users', () => {
   return users;
});

Step 6: Response returns. Nginx encrypts before sending to browser.

Node
   |
HTTP
   |
Nginx
   |
HTTPS
   |
Browser

Why Do This?

1. Less CPU Usage: As Encryption/decryption is expensive.

Without termination:

100 servers
100 TLS handshakes
100 certificate configs

With termination: Reverse proxy handles TLS. Backend servers focus on business logic.

2. Easier Certificate Management

Without reverse proxy: Nightmare to maintain certificates.

Certificate on Server 1
Certificate on Server 2
Certificate on Server 3

With reverse proxy: Certificate to be maintained only on Nginx. Renew once.

3. Simpler Backend Code: Backend doesn't care about HTTPS. It Just process requests.

app.get('/users', ...)

Real MAANG Architecture

User
  |
HTTPS
  |
Load Balancer
  |
HTTPS
  |
Reverse Proxy
  |
HTTP/gRPC
  |
Microservices

or

User
  |
HTTPS
  |
Load Balancer (TLS Termination)
  |
HTTP
  |
Services

Often the cloud load balancer itself performs TLS termination.

Important note on SSL/TLS termination: SSL/TLS termination means a reverse proxy or load balancer handles HTTPS encryption/decryption on behalf of backend servers. The client communicates securely with the proxy using HTTPS, the proxy decrypts the request and forwards it to backend services, typically over HTTP or an internal secure network. This reduces CPU overhead on application servers and centralizes certificate management.

The benefit of TLS termination is that:

1,000 Clients
      |
      v
Reverse Proxy
      |
      v
100 Backend Servers

The 100 backend servers do not perform those 1,000 TLS handshakes.
The reverse proxy performs them and forwards the already-decrypted requests internally.That's where the CPU savings come from. As "TLS connection terminates at the reverse proxy instead of the application server so its termed as TLS termination.