Proxy vs. Reverse Proxy (Explained by Example)

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 416

  • @hnasr
    @hnasr  2 роки тому +2

    Get my Fundamentals of Networking for Effective Backends udemy course Head to network.husseinnasser.com (link redirects to udemy with coupon)

  • @kevinkkirimii
    @kevinkkirimii 4 роки тому +391

    A proxy allows clients to communicate (connect) with servers anonymously while a reverse proxy allows servers to communicate (serve) with clients anonymously. That's my one liner

    • @ManuelInfoSec
      @ManuelInfoSec 3 роки тому +5

      11 mins in one word. I stayed longer because of the benefits though.

    • @anveshreddy2150
      @anveshreddy2150 3 роки тому

      Not only anonymous there are much things you can do with proxy

    • @Ham-pb7pb
      @Ham-pb7pb 3 роки тому

      @@anveshreddy2150 What else can you do with a proxy?

    • @dartz7137
      @dartz7137 3 роки тому

      @@Ham-pb7pb Caching?

    • @proscience1226
      @proscience1226 2 роки тому +6

      @@Ham-pb7pb Load Balancing, Caching, Security because you can hide a lot of your servers who works together behind the reverse proxy, ...

  • @dmitriy_dokshin
    @dmitriy_dokshin 4 роки тому +307

    For those trying to understand the difference, a quote from the video: "In reverse proxy the client doesn't know which server it is connecting to (balancer). In proxy the server doesn't know which client it is connecting from (VPN)."

    • @hayounglee5929
      @hayounglee5929 4 роки тому +2

      Great explanation! Thanks!

    • @himanshukushwah5211
      @himanshukushwah5211 4 роки тому +1

      Thanks Dimitri

    • @ragavnitinpande5612
      @ragavnitinpande5612 3 роки тому +2

      Bro, your 5 magical line explained everything

    • @krishm5116
      @krishm5116 3 роки тому +1

      Trying to understand, In both the cases, Is the end-response is bypassing Reverse-Proxy/Load-balancer and directly sending it to Client? My understanding is, in both the cases END servers doesn't know FIRST client.
      I mean, Reverse-Proxy/Load-balancer just to re-direct request not bothered on Response? Please explain.

    • @gabiborsky1811
      @gabiborsky1811 3 роки тому +2

      Not necessarily a vpn. Since in a vpn, all communication is encrypted between the machines which are in the network, but it can also just be a proxy without encryption, and still not a vpn

  • @hnasr
    @hnasr  6 років тому +197

    Proxy Explained: 00:20
    Proxy Benefits: 02:25
    Reverse Proxy Explained: 04:55
    Reverse Proxy Benefits: 06:49
    Remake of this video (2020) Available here with more details, FAQ & more ua-cam.com/video/SqqrOspasag/v-deo.html)

  • @NastyWicked
    @NastyWicked 4 роки тому +36

    Glad UA-cam recommended me this one. Love the analogy, best simplification I heard so far:
    Proxy: Server doesn't know who the real client is
    Reverse Proxy: The client doesn't know who the real (backend) server is

  • @abdallahdhaou3065
    @abdallahdhaou3065 5 років тому +19

    Thank you Hussein for all your video, all of them are just really great :)
    I want to add these explanations:
    Proxy : Sits between the client and the internet which is often used within organisation to monitor web traffic.
    Reverse Proxy : Sits between internet and our servers which often used to load balance traffic & serve content from cache.
    After all, your phrase 'With a proxy the server do not know the client, with a reverse proxy the client doesn't know which server is serving the content' is extremely powerful and self-explanatory, I used it on technical interview and the recruiter was impressed by the simplicity :D

    • @hnasr
      @hnasr  5 років тому +3

      abdallah dhaou Thats is amazing! Very happy I could help. Best of luck and thanks for the summary

  • @vjnvisakh
    @vjnvisakh 5 років тому +10

    I like the line "server doesn't know which client" and "client doesn't know which server" ... well explained.

  • @namahshrestha3226
    @namahshrestha3226 6 років тому +28

    So all the instructors iv seen till now were just making this concept more difficult than its supposed to be..amazing explanation man..subscribed

    • @hnasr
      @hnasr  6 років тому +1

      Namah Shrestha im humbled, thank you for your lovely comment.

  • @slidenerd
    @slidenerd 2 роки тому +21

    you dont want the servers knowing who you are = forward proxy
    you dont want the clients knowing who you are = reverse proxy

  • @GuitarreroDaniel
    @GuitarreroDaniel 4 роки тому +12

    When I want to learn a backend concept, you're always my first choice man. Amazing explanation!

  • @jaya_surya
    @jaya_surya 3 роки тому

    Super video! I applauded for ₹40.00 👏

  • @prateek2159
    @prateek2159 3 роки тому

    I seriously want you to make a course on all the in-depth concepts you know in back-end engineering 🤩🤩

  • @joshuayoung8299
    @joshuayoung8299 3 роки тому +1

    Great explanation. So within an enterprise network you want your clients outbound traffic to go through a forward proxy. For your environment's endpoints and web servers, you want external traffic to come through a reverse proxy.

    • @hnasr
      @hnasr  3 роки тому

      Well said, nice summary

  • @sunnyhours84
    @sunnyhours84 4 роки тому +14

    Superb content, just subscribed. We need a "Proxy killed democracy" t-shirt!

  • @arborinfelix
    @arborinfelix 5 років тому +85

    Best sentence in a Video About Proxys: "Besically we killed Democracy"

    • @aftalavera
      @aftalavera 4 роки тому

      Eternal struggle!

    • @propertyguru22
      @propertyguru22 4 роки тому

      Correct spelling is Basically not Besically.

  • @ahmedz121
    @ahmedz121 4 роки тому

    Nasser, in a reverse proxy the client goes to the server first - and the server then reverse proxies you to another system, such as CASB or Okta or anything else like that; with a proxy you go to the proxy first and then onto your server!

  • @sandeepkosta5750
    @sandeepkosta5750 3 роки тому

    Sir I must say your videos are pure gold.

  • @kaustubhdesai9262
    @kaustubhdesai9262 4 роки тому

    This is the most crystal clear explanation of the differences. Thank you Hussein.

    • @hnasr
      @hnasr  4 роки тому

      ❤️❤️

  • @sskrypt460
    @sskrypt460 2 роки тому

    the one video that gave enough clarity on what a reverse proxy actually meant. thanks mate.

  • @avirajkhare00
    @avirajkhare00 3 роки тому

    Super video! I applauded for ₹100.00 👏👏

    • @hnasr
      @hnasr  3 роки тому +1

      Thank you so much 😀

  • @YanYong
    @YanYong 4 роки тому +1

    You did a really good job explaining the difference between these two. Help me a lot, Thanks man.

  • @StevePlaysBanjo
    @StevePlaysBanjo 4 роки тому

    Elegantly (and humorously) explained!

    • @hnasr
      @hnasr  4 роки тому

      Thank you Steve !!

  • @PriyaYadav-bu9me
    @PriyaYadav-bu9me 6 років тому +22

    Thanks for such a good content !! I was very confused between proxy and reverse proxy earlier but now its clear :p

    • @hnasr
      @hnasr  6 років тому +2

      Priya Yadav glad I could help Priya. Thanks for your comment :)

  • @sammyiboi
    @sammyiboi 6 років тому +10

    Great explanation! Finally understand the difference between the two now. Not too difficult :)

    • @hnasr
      @hnasr  6 років тому +2

      sammyiboi really glad I could help :) yes difference is simple! have a great day and thanks for your comment

  • @ranjeetbadhe446
    @ranjeetbadhe446 6 років тому +2

    The clients behind the proxy server can be identified by the Web server. The client originating the Web request (modern browsers) will embed the IP address in the header. There are many websites which displays the originating IP address of the client, even if you are using proxy server.

    • @hnasr
      @hnasr  5 років тому +1

      That is correct. Proxies can add the via headers or originating ip address . So the server can know the original client. in a proxy that doesn’t change the content, the server wont know the client

  • @51w2
    @51w2 6 років тому +3

    Thank you for simplifying matters. It shows u know a lot to be able to do this. well-done!

    • @hnasr
      @hnasr  6 років тому

      SIM KM thank you so much. I got to admit that I dont think I know alot I know barely enough to scratch the surface and still learning everyday :). Glad you like it!

  • @GururajBN
    @GururajBN 5 років тому +1

    Thanks for the very lucid explanation. I did not know about reverse proxies until I heard you. Thanks again.

    • @hnasr
      @hnasr  5 років тому

      Thanks Guruaj for your message. Glad I could help! Cheers

  • @xievalkie4943
    @xievalkie4943 3 роки тому

    You made this video so much fun to watch.

  • @aftalavera
    @aftalavera 4 роки тому +5

    Great explanation! Simple and concise. Keep up the good work!

    • @hnasr
      @hnasr  4 роки тому +1

      Thanks Angel!!

  • @_productivity__nill_1131
    @_productivity__nill_1131 5 років тому +2

    Best explanation on UA-cam

    • @hnasr
      @hnasr  5 років тому

      I’m humbled thanks for watching!

  • @Adjudicators
    @Adjudicators 5 років тому +191

    We killed democracy is what we do 😂😂😆

    • @hnasr
      @hnasr  5 років тому +25

      Patrick Doneld someone made it to the end of the video 😂

    • @LuisSierra42
      @LuisSierra42 4 роки тому +2

      @@hnasr I did as well

    • @susanthakumara2223
      @susanthakumara2223 4 роки тому +5

      China comes to mind

  • @davidfagerstrom5010
    @davidfagerstrom5010 3 роки тому

    Excellent explanation you did it better then my university’s teacher. Thank you very much!

  • @ryandsouza9093
    @ryandsouza9093 4 роки тому +1

    Can you please do the grokking system design course? I've seen like 10 other channels, your's is the only one I can binge.

  • @erurrutia
    @erurrutia 5 років тому +3

    Thanks. Very simple and easy to understand explanation.

    • @hnasr
      @hnasr  5 років тому

      Edgardo Rivera thank you for watching happy i could help.

  • @yashasvi9655
    @yashasvi9655 6 років тому +2

    Great video. I am hosting an application and was wondering what reverse proxy was. Thank you!

    • @hnasr
      @hnasr  6 років тому

      Yashasvi glad the video was useful :)

  • @Apoorvpandey
    @Apoorvpandey 4 роки тому +75

    "Basically we kill democracy, that's what we do " 😂😂😂

    • @jonathandagan8855
      @jonathandagan8855 3 роки тому

      Had it paused at 4:48 and resumed it just to get surprised by this amazing line

  • @demidrek-heyward
    @demidrek-heyward 3 роки тому +1

    Hussein you are killing it ! thanks

  • @brunodonascimentomaciel9984
    @brunodonascimentomaciel9984 5 років тому +2

    Nice explanation, now I know how nginx works. Thanks from Brazil.

    • @hnasr
      @hnasr  5 років тому

      Bruno do Nascimento Maciel Thanks for your comment 😊 nginx is a cool layer 7 reverse proxy , did you check out Caddy or haproxy?

  • @hnasr
    @hnasr  3 роки тому +7

    Learn the fundamentals of the backend, scaling and load balancing with my Introduction to NGINX udemy course
    Grab a discount coupon here nginx.husseinnasser.com

  • @Nurckye
    @Nurckye 4 роки тому +1

    Very good content presented in an easy-to-grasp manner. Subscribed!

    • @hnasr
      @hnasr  4 роки тому +1

      Radu Nițescu thanks Radu!! Enjoy the content 😊

  • @Aahnik
    @Aahnik Рік тому +1

    Thanks for this video.... Nicely explained 😀

  • @empuraan4710
    @empuraan4710 3 роки тому

    Best video on proxies out there

  • @WarehOweh
    @WarehOweh 5 років тому +6

    Thanks for this simple explanation.

  • @bsummer
    @bsummer 2 роки тому

    aws load balancing brought me here, You are a genius

  • @nityadeepika1967
    @nityadeepika1967 2 роки тому

    Hi Hussein, thanks for this crisp video. whats the difference between proxy and an AWS NAT gateway

  • @manu52dain13
    @manu52dain13 3 роки тому +1

    Great explanation! Thanks :D

  • @barcannon
    @barcannon 4 роки тому

    great explanation! most of tech is just vocabulary, when you understand its just common sense.

    • @hnasr
      @hnasr  4 роки тому +1

      articulate exactly everything is common sense. Explaining a concept with another complicated concept just confuses me so I like to simplify things

  • @panditpramode
    @panditpramode 4 роки тому +1

    Explained in best way....

  • @mateusmelodn
    @mateusmelodn 3 роки тому

    Best explanation I've ever seen. Thank you

  • @GauravSingh-xi4bp
    @GauravSingh-xi4bp 2 роки тому

    Thanks for making this video. Nicely paced and easy explanation.

  • @Littleanimalsarecute
    @Littleanimalsarecute 2 роки тому

    Nice video! I appreciated the humor. 🐿😎

  • @jeff-TessAD2022
    @jeff-TessAD2022 4 роки тому +2

    THANK YOU SO MUCH. Love the visual. Always getting this confused before.

    • @hnasr
      @hnasr  4 роки тому

      Thanks Jeff! I used to get confused about this all the time as well that is why I made this video

  • @sangeethamuchi8870
    @sangeethamuchi8870 4 роки тому

    Protocol mapping as well ; respond to https traffic and talk to internal servers via http etc

  • @lizzigibson2927
    @lizzigibson2927 Рік тому

    This man is a hero.

  • @md.mainuddin8211
    @md.mainuddin8211 3 роки тому

    Well explained bro (That's why subscribed). Thanks a lot. Keep it up.

  • @innovation-streams5789
    @innovation-streams5789 6 років тому +2

    Simple and clear explanation. Great video.

    • @hnasr
      @hnasr  5 років тому

      innovation-streams thank you so much!

  • @rahulk398
    @rahulk398 3 роки тому

    So as an example for the canary deployment can we consider how netflix shows different thumbnails each time we log in?

  • @ramirez368
    @ramirez368 3 роки тому

    Pretty pretty nice explanation Hussein!!!!

  • @briankent71
    @briankent71 5 років тому

    Great video Hussein. Very clear and simplified.

    • @hnasr
      @hnasr  5 років тому

      Thanks Brian Appreciate it !!

  • @madanmohanpachouly6135
    @madanmohanpachouly6135 2 роки тому

    Very clear explanation.. Thanks a lot for your efforts.

  • @BiebenidoCepeda
    @BiebenidoCepeda Рік тому

    In my testing, Zeus Proxy stands out as the best among proxy providers, offering robust customer success support and dependable IPs in a large pool, all at a competitive price.

  • @trayambakkumar
    @trayambakkumar 3 роки тому +1

    If ISPs are using a proxy then will the DNS be stored in the proxy itself? If this is true, will changing the DNS unblock web sites? I am confused about how DNS and proxy work together.

  • @tjblackman08
    @tjblackman08 5 років тому +2

    Good video. Good visualization! Thanks

  • @thisiztheewae
    @thisiztheewae 2 роки тому

    Explained really really clearly. Thank you for sharing!

  • @shubhamchopra5518
    @shubhamchopra5518 5 років тому +3

    Do we use proxy and reverse proxy together or do we either use one of them in production ?

    • @hnasr
      @hnasr  5 років тому +4

      Good question, it depends on the use case. You can use one of them only or both. A reverse proxy is most widely used as a load balancer. (Nginx, haproxy, caddy)
      A proxy can be used to move common library logic outside the application (example service mesh, linkerd, envoy)
      Yes you can deploy a proxy and a reverse proxy in your system, this is particularly common in microservices architecture. Doesn’t necessarily mean its a good idea though since it increases overhead.
      Hope that helps,

  • @onikazadovi8745
    @onikazadovi8745 4 роки тому

    Thanks for this nice video, Mr. Hussain. Expecting a lot more videos from you.

  • @bariscelikag304
    @bariscelikag304 3 роки тому

    Nice video, easily comprehensible definition...
    So, Haproxy is a "reverse proxy" typed application and it works as "loadbalancer"

  • @-q-b0_1
    @-q-b0_1 4 роки тому

    Great video explained in simple way on. Reverse proxy 👍

  • @kavin.p9689
    @kavin.p9689 5 років тому +2

    Thank u Bro for the clear explanation of reverse proxy. go ahead

    • @hnasr
      @hnasr  5 років тому +1

      kavin tharun thank you for watching 😊

  • @lieutallen
    @lieutallen 4 роки тому +2

    I would have loved to understand the impact of session and cookies if any in case of proxies.

  • @karabakhazerbaijan1646
    @karabakhazerbaijan1646 4 роки тому

    Best explanation with diagram.

  • @padamthapa1889
    @padamthapa1889 6 років тому +2

    this video is much beneficial for me nice explain m fro, india love u

    • @hnasr
      @hnasr  6 років тому

      zero axis glad you enjoy it! all the love to my indian subs ❤️

  • @anhvunguyen8171
    @anhvunguyen8171 5 років тому +1

    Very simple explanation. Thank you!

  • @sebastianrobertson5504
    @sebastianrobertson5504 5 років тому +2

    Great summation. Thank you.

    • @hnasr
      @hnasr  5 років тому

      Sebastian Robertson happy to help

  • @danieluxury
    @danieluxury 4 роки тому

    brow, thank you so much for your videos, but I have a comment: I think that I get the information, maybe from your channel, the most direct way, to not lose the focus (for example, I got kind of lost when you made the democracy comment, because I mostly agree, it is kind of your point of view, or the usage, but not the definition itself) Sorry if what i wrote is not clear, or maybe I am not making myself clear, but English is not my native language.

  • @fedus22
    @fedus22 5 років тому +1

    Can you chain multiple proxys? And is there any reason to do that?

    • @hnasr
      @hnasr  5 років тому +1

      What a great question and Yes! Very possible here are few examples You can have a frontend reverse proxy that acts like a tls terminator (nginx, haproxy, caddy etc) that communicate with a backend of another vanilla unencrypted HTTP reverse proxy http accelerator so we can do caching ( varnish ), which then communicates with another reverse proxy that re establishes TLS (nginx) then that reverse proxy will also acts like a load balancer to balance the requests between 10 services on the backend.
      That is a common CDN production setup.
      Another chain of proxies example are service meshes such envoy and linkerd and istio where those act like both proxy and reverse proxy at the same time.
      Checkout the proxy playlist on the channel to learn more
      Hope that helps

    • @fedus22
      @fedus22 5 років тому

      @@hnasr Thank you, I was just curious about this possibility. You cleared that out and I will sure check your playlist.

  • @Andy-lr1gx
    @Andy-lr1gx 4 роки тому +1

    Very funny, easy to understand and epic voice :D

  • @adeepak7
    @adeepak7 6 років тому +2

    Good video man! Learned a lot!

  • @ulsishefali
    @ulsishefali 4 роки тому +1

    In my opinion you need to explain proxy concept in slightly different manner.Because it’s not pretty clear why hiding the identity of client is beneficial. It would be better if you show two different scenarios listed below:
    1) once enclosing clients as well as proxy within an intranet and keeping server in outside world which is internet. That way hiding multiple clients identity makes sense. eg: From my office network, I want to google some information. In that case google server doesn’t really need to know my identity as a client
    2) in second scenario enclose servers n proxy(which is reverse proxy in this case) into intranet and keep client in outside world which is internet. With this implementation, clients doesn’t really need to know the actual server where request has been redirected. eg: google maintains information on various servers internally which should be hidden from outside world.

    • @hnasr
      @hnasr  4 роки тому

      shefali mittal thank you for your feedback! I really appreciate it 🙏
      I covered some of these topics in the new 2020 version here
      ua-cam.com/video/SqqrOspasag/v-deo.html

  • @corwaincyrus5
    @corwaincyrus5 2 роки тому

    My twoliner:
    Proxy: Requests go from unknown source to known destination.
    Reverse Proxy: Requests go from known source to unknown destination.

  • @jmpstartproduction288
    @jmpstartproduction288 6 років тому +1

    really helpful and professionally explained GJ

    • @hnasr
      @hnasr  6 років тому

      Thank you very much :) Really glad you enjoyed the content.

  • @Kqto
    @Kqto 5 років тому +1

    Great video. Excellent explanation!

  • @techsapphire
    @techsapphire 4 роки тому

    Can I reverse proxy any website on my domain?

  • @tutao2008
    @tutao2008 5 років тому +2

    Nice one Husso thanks from Brazil

    • @hnasr
      @hnasr  5 років тому

      Love all my subs from Brazil 🇧🇷❤️

  • @preetibhave9467
    @preetibhave9467 3 роки тому

    Subscribed! Really great content. Concepts explained so beautifully. Thanks

    • @hnasr
      @hnasr  3 роки тому

      🙏🙏

  • @durgeshpachghare6901
    @durgeshpachghare6901 4 роки тому +2

    Perfect explanation!

  • @ArjunKalidas
    @ArjunKalidas 4 роки тому +1

    This was a very useful content. Thanks for making this video!

  • @PakArchives
    @PakArchives 4 роки тому +1

    Thank you very much for such an awesome tutorial

  • @LeSaboteur3981
    @LeSaboteur3981 4 роки тому

    Thanks for this short and good explanation that helped me a lot!

    • @hnasr
      @hnasr  4 роки тому

      Glad it helped Appreciate you

  • @andrescastillo2863
    @andrescastillo2863 5 років тому +4

    @Hussein Nasser
    You mentioned that using VPN to trick a proxy.
    In your proxy schematic. where would the VPN sit?
    If I had to guess it would sit somewhere between the client and the proxy.

    • @hnasr
      @hnasr  5 років тому +2

      Andres Castillo excellent question Andy! The VPN can set in two places, it set behind the proxy as just another servers that we tunnel things through. As long as your proxy packets through the connection to that VPN server.
      Or the VPN can completely replace your proxy completely, effectively acts as your proxy server and do tunneling through your connection.
      It also depends if you are going through a transparent proxy or an actual layer 7 proxy. If your ISP implements a transparent proxy that might be able to block access to certain VPN, if your ISP (or workplace) forces you to use a proxy on your client (worse thing they can do) they might even block your internet if you don’t use their proxy. This is so that they can spy on you . For workplace that might be ok, but ISP big no no

    • @hnasr
      @hnasr  5 років тому +1

      Check out my VPN vs Proxy video ua-cam.com/video/npnqyRT77Zc/v-deo.html

    • @TheBooban
      @TheBooban 4 роки тому +1

      It cannot sit between the client and proxy because then the proxy still has to know where the request is going in order to send it.

  • @mhcbon4606
    @mhcbon4606 4 роки тому

    i did not know about gliffy, pretty cool.

  • @ringoaikocascade
    @ringoaikocascade 5 років тому +10

    tldr; the server doesn't know end source(proxy) and the client doesn't know the end destination(reverse)

  • @olgayazovskaya2881
    @olgayazovskaya2881 6 років тому +3

    Great Explanation!

    • @hnasr
      @hnasr  6 років тому

      Olga Yazovskaya thanks! Glad you liked the video

  • @roshankumar2642
    @roshankumar2642 4 роки тому +1

    Such nicely explained.. thanks

  • @cazmaj
    @cazmaj 4 роки тому

    Thanks very much, well explained!!
    For stale caching how is it avoided? Presumably there would be a retention period but any common dynamic way to avoid?

    • @hnasr
      @hnasr  4 роки тому

      Ill make a video on this topic but you can use write through or write back to avoid

  • @ajazio
    @ajazio 2 роки тому

    I have a qucik question, can the same server act as a proxy server and a reverse proxy server at the same time, or do we need 2 separate servers?

  • @abdulmlaikalomayri727
    @abdulmlaikalomayri727 Рік тому

    As always Great content with clear explications.

  • @n1ghthawkx
    @n1ghthawkx 5 років тому +4

    Great explanation, thank you!

    • @hnasr
      @hnasr  5 років тому

      n1ghthawkx thanks for watching appropriate it

  • @kjjjjjj26
    @kjjjjjj26 3 роки тому

    For the people that doesnt understands
    A proxy server protects your ip data from data hackers collections ( when you browse around internet in a sandboxied browser ) for browsing only, dont place personal data in proxied
    An ISP should offer proxied for every client
    But this is enabled only in countries where your privacy matters
    I dont knoq which country that is

  • @sreevishal2223
    @sreevishal2223 4 роки тому

    I understood that proxy and reverse proxy are same because client thinks he got response from server but actually it got from proxy and the server thinks it got request from client but(proxy) so both parties are anonymous to each other right? So why two different terms instead of saying just proxy?