First thing first, what is a proxy?
- if something is doing work on behalf of something. The thing that was doing on behalf of something is called proxy.
A proxy server serves as an intermediary between a user's device and the internet. When a user requests a resource (such as a webpage or a file), the request is first sent to the proxy server, which then forwards the request to the internet. The response from the internet is then returned to the proxy server, which forwards it back to the user
Benefits and Use Cases:
Security: Proxies can act as a barrier between users and the internet, filtering out malicious content and protecting the network from cyber threats.
Content Control: In environments like schools or workplaces, proxies can be used to control access to certain websites or content categories, ensuring compliance with usage policies.
Bandwidth Optimization: By caching frequently accessed content locally, proxies can reduce bandwidth usage and speed up access to commonly visited websites.
Anonymity and Privacy: Some proxies, like VPN (Virtual Private Network) proxies, provide users with anonymity by hiding their IP addresses and encrypting their internet traffic.
First, let me explain in detail and then at the end, will take the hotel as an example and explain how can we interrelate with our proxies concept.
Types of Proxies
proxies are divided into 4 types depending upon the usage by us.
Forward Proxy:
Forward proxies, also known as proxy servers or simply proxies, act on behalf of clients within a private network to access resources from the internet.
To protect clients in your internal network, put them behind a Forward Proxy
Real-world Example: In corporate environments, forward proxies are deployed to control and monitor internet access for employees. They enhance security by filtering out malicious content and regulating access to unauthorized websites.
Reverse Proxy:
Reverse proxies sit between internet users and web servers, handling requests on behalf of the servers. They can distribute incoming requests among multiple servers to improve performance and provide additional security features.
Real-world Example: Content delivery networks (CDNs) often use reverse proxies to cache static content like images and videos closer to users, reducing load times and improving overall website performance.
if you intend to protect servers, put them behind a Reverse Proxy
Transparent Proxy:
A transparent proxy sits between your device and the websites you visit, intercepting and routing your traffic without you even knowing. It acts like a middleman, forwarding requests and responses without modifying them. This makes it ideal for security purposes, like content filtering or monitoring network activity
Real-world Example: Internet service providers (ISPs) often use transparent proxies to optimize network performance by caching frequently accessed content and reducing bandwidth usage.
SOCKS Proxy:
Unlike its transparent counterpart, a SOCKS proxy works on a different protocol, allowing it to handle various types of traffic, including UDP and TCP. This makes it more versatile for tasks like bypassing geo-restrictions or accessing blocked websites. However, SOCKS proxies require configuration on your device and may not offer the same level of security as transparent proxies
Real-world Example: Users in countries with restricted internet access may utilize SOCKS proxies to bypass censorship and access blocked websites.
Explaining Proxies with Hotel Analogy :
The people who are going to eat food = clients
The person who receives orders = waiter (proxy)
The people who cook food = chef (servers)
when we went to the hotel, we took our seats and the waiter came to us and took our order. We don't know, from where he was getting food and who made the food for us.
if client don't know about the servers then it is called a forward proxy.
After taking orders from us, waiter goes to the kitchen and informs the team about thee order and different chefs like one for chicken, one for rice etc provides the item that was mentioned by the waiter. Here waiter collects the food and gives it to the particular requested client.
if servers don't know to whom they are serving the services then it is called Reverse Proxy.
That's it for this blog.
Hope you got some good learning. Please provide your feedback by doing like ๐, sharing, and commenting.
follow Nagacharan for more learning related to devops and cloud.