Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

What do you know about Proxy? Forward and Reverse Proxy

Posted on Sep 8 A proxy is a server that acts as an intermediary between clients (such as web browsers or applications) and servers (your backend). It facilitates communication between them while adding various functionalities like security, caching, load balancing, or anonymity. In other words, a proxy server is a middleware or middle-man between the client and the server.Imagine a proxy server like a middle-person or a messenger that helps when you want to communicate with someone else, like sending a letter through a friend.Clients: These are like you when you use the internet. It could be your web browser, a mobile app, or any device that wants to talk to a website or an online service.Servers: These are like the websites and services you visit on the internet. When you open a web page or use an app, you connect to a server with the information you need. The server here talks about the backend behind the things you see on the website, web app or mobile applicationProxy Server: The proxy server is the helpful middle-person. When you want to talk to a website or service, you don't talk directly to it. Instead, you talk to the proxy server and it handles all your requests on your behalf.Now, let's delve deep, shall we 😊?A Forward Proxy, often simply referred to as a proxy server is positioned on the client-side of the network. It serves as a gateway for client devices to access resources on the internet, primarily providing anonymity and caching benefits.Here is how a forward proxy works:Client Request: When a client (e.g., a web browser) makes a request to access a resource on the internet, it sends the request to the forward proxy server instead of directly connecting to the target server.Proxy Server Handling: The forward proxy server receives the client's request and forwards it on behalf of the client to the target server.Response Relay: The target server processes the request and sends the response back to the forward proxy server.Client Response: The forward proxy server, upon receiving the response, forwards it to the client.A reverse proxy, on the other hand, is positioned on the server-side of the network. It serves as a gateway to distribute client requests to multiple backend servers based on various criteria like load balancing, SSL termination, or URL routing.Here is how a reverse proxy works:Client Request: A client sends a request to access a resource on a particular domain.Reverse Proxy Routing: The reverse proxy server receives the client's request and determines which backend server should handle the request based on predefined rules.Request Forwarding: The reverse proxy forwards the client's request to the selected backend server.Backend Server Response: The backend server processes the request and sends the response back to the reverse proxy.Response to Client: The reverse proxy then relays the response to the client.So, to clarify, forward and reverse proxies are specific types of proxy servers, each with its own distinct role and functionality. the TypeScript examples I gave should give you a basic understanding of how forward and reverse proxy servers work. You can extend and customize these examples to meet your specific requirements or use existing libraries like http-proxy for more advanced features. If you have any questions as regards to this post, you can ask in the comment section below. Thanks for liking, sharing and following 😍. GitHub TwitterLinkedInInstagramFacebook PageTill the next post, Stay tuned 😍 Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Ayoub - Aug 22 Victor Gerbrands - Sep 4 Bitsoft360 Reviews - Aug 28 One Piece is Real - Aug 22 Once suspended, emmanuel_ishola will not be able to comment or publish posts until their suspension is removed. Once unsuspended, emmanuel_ishola will be able to comment and publish posts again. Once unpublished, all posts by emmanuel_ishola will become hidden and only accessible to themselves. If emmanuel_ishola is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to Emmanuel Ishola. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag emmanuel_ishola: emmanuel_ishola consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging emmanuel_ishola will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

What do you know about Proxy? Forward and Reverse Proxy

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×